Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | final class AbsolutePathNormalizer implements PathNormalizerInterface |
||
12 | { |
||
13 | public const WITHOUT_SUFFIX = 'WITHOUT_SUFFIX'; |
||
14 | |||
15 | public const WITH_SUFFIX = 'WITH_SUFFIX'; |
||
16 | |||
17 | /** |
||
18 | * @param array<string,AbsolutePathStrategyInterface> $absolutePathStrategies |
||
19 | */ |
||
20 | public function __construct( |
||
21 | private array $absolutePathStrategies, |
||
22 | ) { |
||
23 | } |
||
24 | |||
25 | #[Override] |
||
26 | public function normalizePathPattern(GacelaConfigItem $configItem): string |
||
27 | { |
||
28 | return $this->absolutePathStrategies[self::WITHOUT_SUFFIX] |
||
29 | ->generateAbsolutePath($configItem->path()); |
||
30 | } |
||
31 | |||
32 | #[Override] |
||
37 | } |
||
38 | |||
39 | #[Override] |
||
44 | } |
||
45 | } |
||
46 |