GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AggregateServiceProvider::getEventSubscribers()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
nc 1
dl 0
loc 1
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace SmoothPhp\LaravelAdapter;
4
5
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
6
use SmoothPhp\Contracts\EventDispatcher\EventDispatcher;
7
8
/**
9
 * Class AggregateServiceProvider
10
 *
11
 * A helper class for registering events with ease handles the class building
12
 *
13
 * @package SmoothPhp\LaravelAdapter
14
 * @author Simon Bennett <[email protected]>
15
 */
16
abstract class AggregateServiceProvider extends LaravelServiceProvider
17
{
18
    /**
19
     *
20
     */
21
    public function boot()
22
    {
23
        /** @var EventDispatcher $eventDispatcher */
24
        $eventDispatcher = $this->app->make(EventDispatcher::class);
25
26
        foreach ($this->getEventSubscribers() as $eventSubscriber) {
27
            $eventDispatcher->addSubscriber($this->app->make($eventSubscriber));
28
        }
29
30
    }
31
32
    /**
33
     * @return array
34
     */
35
    abstract public function getEventSubscribers();
36
37
}
38