Total Complexity | 4 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
8 | class EventCleaner extends BaseCleaner |
||
9 | { |
||
10 | private $listeners; |
||
11 | private $wildcards; |
||
12 | private $wildcardsCache; |
||
13 | |||
14 | public function __construct(Container $currentApp, Container $snapshotApp) |
||
15 | { |
||
16 | parent::__construct($currentApp, $snapshotApp); |
||
17 | |||
18 | $ref = new \ReflectionObject($this->currentApp['events']); |
||
19 | $this->listeners = $ref->getProperty('listeners'); |
||
20 | $this->listeners->setAccessible(true); |
||
21 | |||
22 | $this->wildcards = $ref->getProperty('wildcards'); |
||
23 | $this->wildcards->setAccessible(true); |
||
24 | |||
25 | if ($ref->hasProperty('wildcardsCache')) { // Laravel 5.6+ |
||
26 | $this->wildcardsCache = $ref->getProperty('wildcardsCache'); |
||
27 | $this->wildcardsCache->setAccessible(true); |
||
28 | } |
||
29 | } |
||
30 | |||
31 | public function clean() |
||
37 | } |
||
38 | } |
||
39 | } |