| Total Complexity | 7 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class FooExtensionMenu implements ExtensionMenuInterface |
||
| 21 | { |
||
| 22 | public function __construct(private readonly FactoryInterface $factory) |
||
| 23 | { |
||
| 24 | } |
||
| 25 | |||
| 26 | public function get(string $type = ExtensionMenuInterface::TYPE_ADMIN): ?ItemInterface |
||
| 27 | { |
||
| 28 | if (ExtensionMenuInterface::TYPE_ADMIN === $type) { |
||
| 29 | return $this->getAdmin(); |
||
| 30 | } |
||
| 31 | if (ExtensionMenuInterface::TYPE_USER === $type) { |
||
| 32 | return $this->getUser(); |
||
| 33 | } |
||
| 34 | |||
| 35 | return null; |
||
| 36 | } |
||
| 37 | |||
| 38 | private function getAdmin(): ?ItemInterface |
||
| 39 | { |
||
| 40 | $menu = $this->factory->createItem('foo'); |
||
| 41 | $menu->addChild('list', [ |
||
| 42 | 'route' => 'list', |
||
| 43 | ]); |
||
| 44 | $menu->addChild('foo', [ |
||
| 45 | 'route' => 'foo', |
||
| 46 | ]); |
||
| 47 | $menu->addChild('bar', [ |
||
| 48 | 'route' => 'bar', |
||
| 49 | ]); |
||
| 50 | |||
| 51 | return $menu; |
||
| 52 | } |
||
| 53 | |||
| 54 | private function getUser(): ?ItemInterface |
||
| 62 | } |
||
| 63 | |||
| 64 | public function getBundleName(): string |
||
| 65 | { |
||
| 69 |
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