Total Complexity | 11 |
Total Lines | 60 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | trait MiddlewareTrait |
||
8 | { |
||
9 | protected $middlewares = [ |
||
10 | Middleware\Factory::class, |
||
11 | ]; |
||
12 | |||
13 | protected function bindEvents(Console $console) |
||
14 | { |
||
15 | $evm = $this->di('eventsManager'); |
||
16 | |||
17 | $evm->attach('dispatch', $console); |
||
18 | $console->setEventsManager($evm); |
||
19 | |||
20 | $this->di('dispatcher')->setEventsManager($evm); |
||
21 | } |
||
22 | |||
23 | public function middleware(string $class): self |
||
28 | } |
||
29 | |||
30 | public function middlewares(): array |
||
31 | { |
||
32 | return $this->middlewares; |
||
33 | } |
||
34 | |||
35 | public function beforeExecuteRoute(): bool |
||
36 | { |
||
37 | return $this->relay('before'); |
||
38 | } |
||
39 | |||
40 | public function afterExecuteRoute(): bool |
||
41 | { |
||
42 | return $this->relay('after'); |
||
43 | } |
||
44 | |||
45 | protected function relay(string $event): bool |
||
54 | } |
||
55 | |||
56 | protected function call(string $event, $middleware): bool |
||
57 | { |
||
58 | if (\is_string($middleware)) { |
||
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