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