@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | public function __construct( |
| 38 | 38 | private readonly ConfiguratorInterface $config |
| 39 | - ) { |
|
| 39 | + ){ |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public function init(ContainerInterface $container, ViewsBootloader $views): void |
@@ -76,14 +76,14 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | $views->addEngine(StemplerEngine::class); |
| 78 | 78 | |
| 79 | - if ($container->has(LocaleProcessor::class)) { |
|
| 79 | + if ($container->has(LocaleProcessor::class)){ |
|
| 80 | 80 | $this->addProcessor(LocaleProcessor::class); |
| 81 | - } else { |
|
| 81 | + }else{ |
|
| 82 | 82 | $this->addProcessor(NullLocaleProcessor::class); |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - public function addDirective(string|Autowire|Directive\DirectiveRendererInterface $directive): void |
|
| 86 | + public function addDirective(string | Autowire | Directive\DirectiveRendererInterface $directive): void |
|
| 87 | 87 | { |
| 88 | 88 | $this->config->modify( |
| 89 | 89 | StemplerConfig::CONFIG, |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | ); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - public function addProcessor(string|Autowire|ProcessorInterface $processor): void |
|
| 94 | + public function addProcessor(string | Autowire | ProcessorInterface $processor): void |
|
| 95 | 95 | { |
| 96 | 96 | $this->config->modify( |
| 97 | 97 | StemplerConfig::CONFIG, |
@@ -99,11 +99,11 @@ discard block |
||
| 99 | 99 | ); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - public function addVisitor(string|Autowire|VisitorInterface $visitor, int $stage = Builder::STAGE_COMPILE): void |
|
| 102 | + public function addVisitor(string | Autowire | VisitorInterface $visitor, int $stage = Builder::STAGE_COMPILE): void |
|
| 103 | 103 | { |
| 104 | 104 | $this->config->modify( |
| 105 | 105 | StemplerConfig::CONFIG, |
| 106 | - new Append('visitors.' . $stage, null, $visitor) |
|
| 106 | + new Append('visitors.'.$stage, null, $visitor) |
|
| 107 | 107 | ); |
| 108 | 108 | } |
| 109 | 109 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | ViewsConfig $viewConfig |
| 114 | 114 | ): StemplerEngine { |
| 115 | 115 | $cache = null; |
| 116 | - if ($viewConfig->isCacheEnabled()) { |
|
| 116 | + if ($viewConfig->isCacheEnabled()){ |
|
| 117 | 117 | $cache = new StemplerCache($viewConfig->getCacheDirectory()); |
| 118 | 118 | } |
| 119 | 119 | |
@@ -76,9 +76,12 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | $views->addEngine(StemplerEngine::class); |
| 78 | 78 | |
| 79 | - if ($container->has(LocaleProcessor::class)) { |
|
| 79 | + if ($container->has(LocaleProcessor::class)) |
|
| 80 | + { |
|
| 80 | 81 | $this->addProcessor(LocaleProcessor::class); |
| 81 | - } else { |
|
| 82 | + } |
|
| 83 | + else |
|
| 84 | + { |
|
| 82 | 85 | $this->addProcessor(NullLocaleProcessor::class); |
| 83 | 86 | } |
| 84 | 87 | } |
@@ -113,7 +116,8 @@ discard block |
||
| 113 | 116 | ViewsConfig $viewConfig |
| 114 | 117 | ): StemplerEngine { |
| 115 | 118 | $cache = null; |
| 116 | - if ($viewConfig->isCacheEnabled()) { |
|
| 119 | + if ($viewConfig->isCacheEnabled()) |
|
| 120 | + { |
|
| 117 | 121 | $cache = new StemplerCache($viewConfig->getCacheDirectory()); |
| 118 | 122 | } |
| 119 | 123 | |