| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | protected function loadTemplateConfiguration($templatePath) |
||
| 45 | { |
||
| 46 | $templateConfiguration = null; |
||
| 47 | if ($templatePath) { |
||
| 48 | if (is_dir($templatePath)) { |
||
| 49 | $templateConfiguration = $this->configurationLoader->fromPath($templatePath); |
||
| 50 | } elseif (is_file($templatePath)) { |
||
| 51 | $templateConfiguration = $this->configurationLoader->fromString(file_get_contents($templatePath)); |
||
| 52 | } else { |
||
| 53 | throw new \UnexpectedValueException('Template path is nor a file or a path !'); |
||
| 54 | } |
||
| 55 | } |
||
| 56 | |||
| 57 | return $templateConfiguration; |
||
| 58 | } |
||
| 59 | } |
||
| 60 |