Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class Main extends Controller |
||
12 | { |
||
13 | /** |
||
14 | * Before action method call injection |
||
15 | */ |
||
16 | public function before() |
||
17 | { |
||
18 | //self::$layout = 'other.php'; |
||
|
|||
19 | } |
||
20 | |||
21 | /** |
||
22 | * Default index action |
||
23 | * @return null|string |
||
24 | */ |
||
25 | public function actionIndex() |
||
26 | { |
||
27 | $this->wtf = 'Test global variable'; |
||
28 | |||
29 | return $this->view->render('main/index', ['t1' => 'test1', 't2' => 'test2']); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Pass id inside example |
||
34 | * @param int $id |
||
35 | */ |
||
36 | public function actionRead($id) |
||
39 | } |
||
40 | } |
||
41 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.