| Total Complexity | 6 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class TestKernel extends \Kernel |
||
| 10 | { |
||
| 11 | public function registerBundles(): iterable |
||
| 12 | { |
||
| 13 | $bundles = require __DIR__ . '/../../vendor/akeneo/pim-community-dev/config/bundles.php'; |
||
| 14 | $bundles += require __DIR__ . '/config/bundles.php'; |
||
| 15 | |||
| 16 | foreach ($bundles as $class => $envs) { |
||
| 17 | if ($envs[$this->environment] ?? $envs['all'] ?? false) { |
||
| 18 | yield new $class(); |
||
|
|
|||
| 19 | } |
||
| 20 | } |
||
| 21 | } |
||
| 22 | |||
| 23 | public function getRootDir(): string |
||
| 24 | { |
||
| 25 | return __DIR__; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getProjectDir(): string |
||
| 31 | } |
||
| 32 | |||
| 33 | protected function build(ContainerBuilder $container) |
||
| 47 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: