mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:02:44 +08:00
Prefer passing an array to ServiceProvider::extend
This commit is contained in:
parent
435880733d
commit
da461b1be7
|
@ -22,8 +22,14 @@ class ServiceProvider extends IlluminateServiceProvider
|
|||
|
||||
public function extend()
|
||||
{
|
||||
foreach (func_get_args() as $extender) {
|
||||
$extender->extend($this->app);
|
||||
// @todo don't support func_get_args
|
||||
foreach (func_get_args() as $extenders) {
|
||||
if (! is_array($extenders)) {
|
||||
$extenders = [$extenders];
|
||||
}
|
||||
foreach ($extenders as $extender) {
|
||||
$extender->extend($this->app);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user