Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | abstract class Controller |
||
6 | { |
||
7 | public function render($view, $params = []) |
||
8 | { |
||
9 | $layoutContent = $this->layoutContent(); |
||
10 | $viewContent = $this->renderOnlyView($view, $params); |
||
11 | return str_replace('{{content}}', $viewContent, $layoutContent); |
||
12 | } |
||
13 | |||
14 | public function layoutContent() |
||
15 | { |
||
16 | ob_start(); |
||
17 | include_once ROOT_DIR . "/app/views/layouts/base.php"; |
||
18 | return ob_get_clean(); |
||
19 | } |
||
20 | |||
21 | protected function renderOnlyView($view, $data) |
||
26 | } |
||
27 | } |
||
28 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.