Total Complexity | 8 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 72.72% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class EventSubscriber |
||
10 | { |
||
11 | /** @var Valet */ |
||
12 | protected $valet; |
||
13 | |||
14 | 206 | public function __construct(Valet $valet) |
|
17 | 206 | } |
|
18 | |||
19 | 2 | public function siteSecured(SiteSecured $event) |
|
20 | { |
||
21 | 2 | if (setting('use_valet', 'off') === 'off') { |
|
22 | 2 | return; |
|
23 | } |
||
24 | |||
25 | $this->valet->addSite($event->site); |
||
26 | } |
||
27 | |||
28 | 2 | public function siteUnsecured(SiteUnsecured $event) |
|
29 | { |
||
30 | 2 | if (setting('use_valet', 'off') === 'off') { |
|
31 | 2 | return; |
|
32 | } |
||
33 | |||
34 | $this->valet->addSite($event->site); |
||
35 | } |
||
36 | |||
37 | 1 | public function siteRemoved(SiteRemoved $event) |
|
44 | } |
||
45 | |||
46 | /** |
||
47 | * Register the listeners for the subscriber. |
||
48 | * |
||
49 | * @param \Illuminate\Events\Dispatcher $events |
||
50 | * |
||
51 | * @return void |
||
52 | */ |
||
53 | 206 | public function subscribe($events) |
|
58 | 206 | } |
|
59 | } |
||
60 |