1 | <?php |
||
5 | trait RestfulTrait |
||
6 | { |
||
7 | /** |
||
8 | * @param string|array $query The query parameters (optional). |
||
9 | * @return mixed |
||
10 | */ |
||
11 | public function all($query = '') |
||
24 | |||
25 | /** |
||
26 | * @return mixed |
||
27 | */ |
||
28 | public function find($id = null) |
||
36 | |||
37 | /** |
||
38 | * @return array | companyID |
||
39 | */ |
||
40 | public function create($data) |
||
44 | |||
45 | /** |
||
46 | * @return mixed |
||
47 | */ |
||
48 | public function update($data, $id = null) |
||
56 | |||
57 | /** |
||
58 | * @return mixed |
||
59 | */ |
||
60 | public function delete($id = null) |
||
68 | } |
This check looks for the bodies of
if
statements that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.These
if
bodies can be removed. If you have an empty if but statements in theelse
branch, consider inverting the condition.could be turned into
This is much more concise to read.