| Total Complexity | 6 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 54.55% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class Dispatcher |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var \Symfony\Component\EventDispatcher\EventDispatcher |
||
| 25 | */ |
||
| 26 | protected $dispatcher; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Dispatcher constructor. |
||
| 30 | */ |
||
| 31 | 292 | public function __construct() |
|
| 32 | { |
||
| 33 | 292 | $this->dispatcher = class_exists(EventDispatcher::class) ? new EventDispatcher() : null; |
|
| 34 | 292 | } |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Adds an event listener that listens on the specified events. |
||
| 38 | * |
||
| 39 | * @param string $eventName The event to listen on |
||
| 40 | * @param callable $listener The listener |
||
| 41 | * @param int $priority The higher this value, the earlier an event |
||
| 42 | * listener will be triggered in the chain (defaults to 0) |
||
| 43 | */ |
||
| 44 | public function addListener($eventName, $listener, $priority = 0) |
||
| 45 | { |
||
| 46 | // Makes callable. |
||
| 47 | if (is_string($listener)) { |
||
| 48 | $listener = new $listener(); |
||
| 49 | } |
||
| 50 | |||
| 51 | return $this->__call('addListener', [$eventName, $listener, $priority]); |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param string $name |
||
| 56 | * @param array $args |
||
| 57 | * |
||
| 58 | * @return mixed |
||
| 59 | */ |
||
| 60 | 292 | public function __call($name, $args) |
|
| 67 | } |
||
| 68 | } |
||
| 69 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths