Total Complexity | 6 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | class DependencyProvider extends AbstractDependencyProvider implements DependencyProviderInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var \Xervice\Core\Config\ConfigInterface |
||
17 | */ |
||
18 | private $config; |
||
19 | |||
20 | /** |
||
21 | * DependencyProvider constructor. |
||
22 | * |
||
23 | * @param \Xervice\Core\Config\ConfigInterface $config |
||
24 | */ |
||
25 | 9 | public function __construct(ConfigInterface $config) |
|
26 | { |
||
27 | 9 | $this->config = $config; |
|
28 | 9 | } |
|
29 | |||
30 | |||
31 | /** |
||
32 | * @param string $name |
||
33 | * @param callable $function |
||
34 | * |
||
35 | * @return \Xervice\Core\Dependency\DependencyProviderInterface |
||
36 | */ |
||
37 | 6 | public function set(string $name, callable $function): DependencyProviderInterface |
|
38 | { |
||
39 | 6 | $this->container[$name] = $function; |
|
40 | |||
41 | 6 | return $this; |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param string $name |
||
46 | * |
||
47 | * @return mixed |
||
48 | */ |
||
49 | 6 | public function get(string $name) |
|
50 | { |
||
51 | 6 | return $this->container[$name]($this); |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return \Xervice\Core\Config\ConfigInterface |
||
56 | */ |
||
57 | 1 | public function getConfig(): ConfigInterface |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return \Generated\Ide\LocatorAutoComplete|\Xervice\Core\Locator\Locator |
||
|
|||
64 | */ |
||
65 | 1 | public function getLocator(): Locator |
|
66 | { |
||
67 | 1 | return Locator::getInstance(); |
|
68 | } |
||
69 | |||
70 | /** |
||
71 | * @param \Xervice\Core\Dependency\Provider\ProviderInterface $provider |
||
72 | */ |
||
73 | 3 | public function register(ProviderInterface $provider): void |
|
76 | 3 | } |
|
77 | |||
79 | } |
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