| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 3 | protected function getTemplatePath(string $templateName): string |
|
| 44 | { |
||
| 45 | 3 | if (file_exists($this->templatePath . '/' . $templateName)) { |
|
| 46 | 1 | return $this->templatePath; |
|
| 47 | } |
||
| 48 | |||
| 49 | 2 | $match = $this->templatePathMatcher->match($templateName); |
|
| 50 | |||
| 51 | 2 | if (false === $match) { |
|
|
|
|||
| 52 | 1 | return realpath(__DIR__ . '/../../templates'); |
|
| 53 | } |
||
| 54 | |||
| 55 | 1 | return $match; |
|
| 56 | } |
||
| 58 |