| Total Complexity | 4 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | class EventsManagerProvider implements ServiceProviderInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * List of the listeners use by the app. |
||
| 15 | * |
||
| 16 | * [ |
||
| 17 | * 'eventName' => 'className' |
||
| 18 | * ]; |
||
| 19 | * |
||
| 20 | * @var array |
||
| 21 | */ |
||
| 22 | protected $listeners = [ |
||
| 23 | ]; |
||
| 24 | |||
| 25 | protected $canvasListeners = [ |
||
| 26 | 'subscription' => Subscription::class, |
||
| 27 | 'user' => User::class, |
||
| 28 | ]; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param DiInterface $container |
||
| 32 | */ |
||
| 33 | public function register(DiInterface $container) |
||
| 34 | { |
||
| 35 | $container->setShared( |
||
| 36 | 'events', |
||
| 37 | function () { |
||
| 38 | $eventsManager = new EventsManager(); |
||
| 39 | |||
| 40 | return $eventsManager; |
||
| 41 | } |
||
| 42 | ); |
||
| 43 | |||
| 44 | $this->attachEvents($container, $this->listeners); |
||
| 45 | $this->attachEvents($container, $this->canvasListeners); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * given the DI attach the list of containers. |
||
| 50 | * |
||
| 51 | * @param DiInterface $container |
||
| 52 | * @param array $listeners |
||
| 53 | * @return void |
||
| 54 | */ |
||
| 55 | protected function attachEvents(DiInterface $container, array $listeners): bool |
||
| 72 | } |
||
| 73 | } |
||
| 74 |
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