Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
16 | class TwigDependencyProvider extends AbstractProvider |
||
17 | { |
||
18 | public const PATH_PROVIDER_COLLECTION = 'path.provider.collection'; |
||
19 | |||
20 | public const TWIG_EXTENSIONS = 'twig.extensions'; |
||
21 | |||
22 | /** |
||
23 | * @param \Xervice\Core\Dependency\DependencyProviderInterface $dependencyProvider |
||
24 | */ |
||
25 | 2 | public function handleDependencies(DependencyProviderInterface $dependencyProvider): void |
|
26 | { |
||
27 | $dependencyProvider[self::PATH_PROVIDER_COLLECTION] = function () { |
||
28 | 2 | return new PathCollection( |
|
29 | 2 | $this->getPathProviderList() |
|
30 | ); |
||
31 | }; |
||
32 | |||
33 | $dependencyProvider[self::TWIG_EXTENSIONS] = function () { |
||
34 | 2 | return new TwigExtensionCollection( |
|
35 | 2 | $this->getTwigExtensions() |
|
36 | ); |
||
37 | }; |
||
38 | 2 | } |
|
39 | |||
40 | /** |
||
41 | * @return \Xervice\Twig\Business\Path\PathProviderInterface[] |
||
42 | */ |
||
43 | 2 | protected function getPathProviderList(): array |
|
44 | { |
||
45 | 2 | return []; |
|
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return \Xervice\Twig\Business\Twig\Extensions\TwigExtensionInterface[] |
||
50 | */ |
||
51 | 2 | protected function getTwigExtensions(): array |
|
54 | } |
||
55 | } |