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