ray-di /
Ray.Di
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Ray\Di; |
||
| 6 | |||
| 7 | use Ray\Aop\Bind as AopBind; |
||
| 8 | use Ray\Aop\MethodInterceptor; |
||
| 9 | |||
| 10 | use function assert; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @psalm-import-type MethodInterceptorBindings from Types |
||
| 14 | */ |
||
| 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 |
||
|
0 ignored issues
–
show
|
|||
| 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; |
||
|
0 ignored issues
–
show
|
|||
| 43 | } |
||
| 44 | |||
| 45 | /** @inheritDoc */ |
||
| 46 | public function accept(VisitorInterface $visitor): void |
||
| 47 | { |
||
| 48 | $visitor->visitAspectBind($this->bind); |
||
| 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