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