| Total Complexity | 4 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 10 | class IsInConfigureComposerPsr4 implements RuleInterface |
||
| 11 | { |
||
| 12 | private EnvironmentDataLoaderInterface $metadataLoader; |
||
| 13 | |||
| 14 | public function __construct(EnvironmentDataLoaderInterface $metadataLoader) |
||
| 15 | { |
||
| 16 | $this->metadataLoader = $metadataLoader; |
||
| 17 | } |
||
| 18 | |||
| 19 | public function apply(Entry $entry, EventProcessNodeInterface $event): bool |
||
| 20 | { |
||
| 21 | $val = $this->stripFirstSlash($entry); |
||
| 22 | |||
| 23 | return $this->metadataLoader->getCollectComposerNamespace()->booleanSearch(new BooleanMatchNameSpace(), $val); |
||
| 24 | } |
||
| 25 | |||
| 26 | private function stripFirstSlash(Entry $token): Entry |
||
| 33 | } |
||
| 34 | } |
||
| 35 |