Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | final class AspectBind |
||
14 | { |
||
15 | /** @var AopBind */ |
||
16 | private $bind; |
||
17 | |||
18 | public function __construct(AopBind $bind) |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Instantiate interceptors |
||
25 | * |
||
26 | * @return array<string, array<MethodInterceptor>> |
||
27 | */ |
||
28 | public function inject(Container $container): array |
||
29 | { |
||
30 | $bindings = $this->bind->getBindings(); |
||
31 | $instantiatedBindings = []; |
||
32 | foreach ($bindings as $methodName => $interceptorClassNames) { |
||
33 | $interceptors = []; |
||
34 | foreach ($interceptorClassNames as $interceptorClassName) { |
||
35 | /** @var class-string $interceptorClassName */ |
||
36 | /** @psalm-suppress MixedAssignment */ |
||
37 | $interceptor = $container->getInstance($interceptorClassName); |
||
38 | assert($interceptor instanceof MethodInterceptor); |
||
39 | $interceptors[] = $interceptor; |
||
40 | } |
||
41 | |||
42 | $instantiatedBindings[$methodName] = $interceptors; |
||
43 | } |
||
44 | |||
45 | return $instantiatedBindings; |
||
46 | } |
||
47 | |||
48 | public function accept(VisitorInterface $visitor) |
||
52 | } |
||
53 | } |
||
54 |
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