| Total Complexity | 9 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 94.44% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class TwigPage implements TwigPageInterface |
||
| 13 | { |
||
| 14 | private ?string $template = null; |
||
| 15 | |||
| 16 | /** @var array<mixed> */ |
||
| 17 | private array $variables = []; |
||
| 18 | |||
| 19 | 5 | public function __construct(private Environment $environment) {} |
|
| 20 | |||
| 21 | 133 | #[Override] |
|
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | 134 | #[Override] |
|
| 32 | public function setTemplate(string $file): void |
||
| 33 | { |
||
| 34 | 134 | $this->template = $file; |
|
| 35 | } |
||
| 36 | |||
| 37 | 1 | #[Override] |
|
| 38 | public function isTemplateSet(): bool |
||
| 39 | { |
||
| 40 | 1 | return $this->template !== null; |
|
| 41 | } |
||
| 42 | |||
| 43 | 133 | #[Override] |
|
| 47 | } |
||
| 48 | |||
| 49 | 133 | private function loadTemplate(): TemplateWrapper |
|
| 50 | { |
||
| 51 | 133 | if ($this->template === null) { |
|
| 52 | throw new RuntimeException('render not possible if template is not set'); |
||
| 53 | } |
||
| 54 | |||
| 55 | 133 | return $this->environment->load($this->template); |
|
| 56 | } |
||
| 57 | |||
| 58 | 131 | public function resetVariables(): void |
|
| 62 | } |
||
| 63 | } |
||
| 64 |
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