| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | 2 | public function getTwigTemplatePaths(): array |
|
| 22 | { |
||
| 23 | 2 | $classCurrent = new \ReflectionObject($this); |
|
| 24 | 2 | $filename = $classCurrent->getFileName(); |
|
| 25 | |||
| 26 | 2 | if (false === $filename) { |
|
| 27 | throw new \RuntimeException('Unable to determine path from where to load twig templates.'); |
||
| 28 | } |
||
| 29 | |||
| 30 | 2 | return [ |
|
| 31 | 2 | \dirname($filename).\DIRECTORY_SEPARATOR.'templates', |
|
| 32 | 2 | ]; |
|
| 45 |