Conditions | 4 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.0312 |
Changes | 0 |
1 | <?php |
||
29 | 1 | public function collect(object $event, string $line): void |
|
30 | { |
||
31 | if ( |
||
32 | !$event instanceof HttpApplicationStartup |
||
33 | && !$event instanceof ConsoleApplicationStartup |
||
34 | 1 | && !$this->isActive() |
|
35 | ) { |
||
36 | return; |
||
37 | 1 | } |
|
38 | |||
39 | 1 | $this->events[] = [ |
|
40 | 1 | 'name' => $event::class, |
|
41 | 'event' => $event, |
||
42 | 1 | 'file' => (new ReflectionClass($event))->getFileName(), |
|
43 | 'line' => $line, |
||
44 | 1 | 'time' => microtime(true), |
|
45 | ]; |
||
46 | $this->timelineCollector->collect($this, spl_object_id($event), $event::class); |
||
47 | } |
||
66 |
This check looks for private methods that have been defined, but are not used inside the class.