| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | 4 | public function getContent(string $view, array $config): string |
|
| 8 | { |
||
| 9 | 4 | $file = getcwd() . '/' . $config['template_dir'] . "/$view.html"; |
|
| 10 | |||
| 11 | 4 | if (!file_exists($file)) { |
|
| 12 | throw new \Exception("$file template not found"); // @codeCoverageIgnore |
||
| 13 | } |
||
| 14 | |||
| 15 | 4 | return $this->removeTags(file_get_contents($file)); |
|
| 16 | } |
||
| 23 |