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 = []): string |
||
8 | { |
||
9 | $layoutContent = $this->layoutContent(); |
||
10 | $viewContent = $this->renderOnlyView($view, $params); |
||
11 | return str_replace('{{content}}', $viewContent, $layoutContent); |
||
12 | } |
||
13 | |||
14 | public function layoutContent(): string |
||
19 | } |
||
20 | |||
21 | protected function renderOnlyView($view, $data): string |
||
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.