Skip to content

Commit 102df66

Browse files
committed
formatting
1 parent a5f21d6 commit 102df66

File tree

1 file changed

+5
-25
lines changed

1 file changed

+5
-25
lines changed

src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ class EventServiceProvider extends ServiceProvider
1616
protected $listen = [];
1717

1818
/**
19-
* The subscriber classes to register.
19+
* The subscribers to register.
2020
*
2121
* @var array
2222
*/
2323
protected $subscribe = [];
2424

2525
/**
26-
* The observers mapping for the application models.
26+
* The model observers to register.
2727
*
2828
* @var array
2929
*/
@@ -49,7 +49,9 @@ public function register()
4949
Event::subscribe($subscriber);
5050
}
5151

52-
$this->registerObservers();
52+
foreach ($this->observers as $model => $observers) {
53+
$model::observe($observers);
54+
}
5355
});
5456
}
5557

@@ -154,26 +156,4 @@ protected function eventDiscoveryBasePath()
154156
{
155157
return base_path();
156158
}
157-
158-
/**
159-
* Get the observers defined on the provider.
160-
*
161-
* @return array
162-
*/
163-
public function observers()
164-
{
165-
return $this->observers;
166-
}
167-
168-
/**
169-
* Register the application model's observers.
170-
*
171-
* @return void
172-
*/
173-
public function registerObservers()
174-
{
175-
foreach ($this->observers() as $model => $observers) {
176-
$model::observe($observers);
177-
}
178-
}
179159
}

0 commit comments

Comments
 (0)