Total Complexity | 5 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | trait EventEmitter |
||
30 | { |
||
31 | protected array $registered = []; |
||
32 | |||
33 | /** |
||
34 | * Receive a message. |
||
35 | * |
||
36 | * @param string $event The event string. |
||
37 | * @param mixed $handler The event handler. |
||
38 | * |
||
39 | * @return self |
||
40 | */ |
||
41 | public function on(string $event, $handler): self |
||
42 | { |
||
43 | if (!isset($this->registered[$event])) { |
||
44 | $this->registered = []; |
||
45 | } |
||
46 | |||
47 | $this->registered[$event][] = $handler; |
||
48 | |||
49 | return $this; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * Send out a message. |
||
54 | * |
||
55 | * @param string $event The event string. |
||
56 | * @param ...$userdata Arguments for the callback. |
||
|
|||
57 | * |
||
58 | * @return self |
||
59 | */ |
||
60 | public function emit(string $event, ...$userdata): self |
||
71 | } |
||
72 | } |
||
73 |
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