1 | <?php |
||
11 | class GenericRepresentationController extends BaseRepresentationController |
||
12 | { |
||
13 | |||
14 | protected $availableMethods = [ |
||
15 | 'GET', |
||
16 | 'POST', |
||
17 | 'PUT', |
||
18 | 'DELETE', |
||
19 | 'OPTIONS' |
||
20 | ]; |
||
21 | |||
22 | protected $recordCount = 0; |
||
23 | |||
24 | protected $hasMorePages = false; |
||
25 | |||
26 | protected $isEmpty = true; |
||
27 | |||
28 | /** |
||
29 | */ |
||
30 | // public function recordCount() |
||
|
|||
31 | // { |
||
32 | // return $this->recordCount(); |
||
33 | // } |
||
34 | |||
35 | // public function hasMorePages() |
||
36 | // { |
||
37 | // return (boolean) $this->hasMorePages; |
||
38 | // } |
||
39 | |||
40 | 1 | public function process() |
|
70 | |||
71 | |||
72 | 1 | public function get() |
|
76 | |||
77 | 1 | public function post() |
|
81 | |||
82 | 1 | public function put() |
|
86 | |||
87 | 1 | public function delete() |
|
91 | |||
92 | 1 | public function options() |
|
96 | |||
97 | |||
98 | } |
||
99 |
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.