Total Complexity | 3 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | class Content |
||
6 | { |
||
7 | public function getContent(string $view, array $config): string |
||
8 | { |
||
9 | $file = getcwd() . '/' . $config['template_dir'] . "/$view.html"; |
||
10 | |||
11 | if (!file_exists($file)) { |
||
12 | throw new \Exception("$file template not found"); // @codeCoverageIgnore |
||
13 | } |
||
14 | |||
15 | return $this->removeTags(file_get_contents($file)); |
||
16 | } |
||
17 | |||
18 | public function removeTags($content) |
||
21 | } |
||
22 | } |
||
23 |