Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
13 | 2 | public function load(array $configs, ContainerBuilder $container) |
|
14 | { |
||
15 | 2 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
16 | 2 | $loader->load('cruds.yml'); |
|
17 | |||
18 | 2 | $config = $this->processConfiguration($this->getConfiguration([], $container), $configs); |
|
|
|||
19 | |||
20 | 2 | $configurator = new CrudsEntitiesConfigurator($container); |
|
21 | 2 | $container->addObjectResource($configurator); |
|
22 | 2 | $prefix = $config['prefix']; |
|
23 | 2 | foreach ($config['entities'] as $name => $entityConfig) { |
|
24 | 2 | $entityConfig['prefix'] = $entityConfig['prefix'] ?: '/'.$name; |
|
25 | 2 | $entityConfig['prefix'] = $prefix.$entityConfig['prefix']; |
|
26 | 2 | $configurator->processEntityConfiguration($name, $entityConfig); |
|
27 | 2 | } |
|
28 | 2 | } |
|
29 | } |
||
30 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: