Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function process(): void |
||
23 | { |
||
24 | $moduleName = $this->request->getModule(); |
||
|
|||
25 | $record = $this->request->getByType('record', Purifier::INTEGER); |
||
26 | $templates = $this->request->getArray('templates', Purifier::INTEGER); |
||
27 | |||
28 | $count = $logsCountAll = 0; |
||
29 | $rows = $columns = []; |
||
30 | foreach ($this->request->getArray('columns') as $key => $value) { |
||
31 | $columns[$key] = $value['name']; |
||
32 | } |
||
33 | header('content-type: text/json; charset=UTF-8'); |
||
34 | echo \App\Json::encode([ |
||
35 | 'draw' => $this->request->getInteger('draw'), |
||
36 | 'iTotalRecords' => $logsCountAll, |
||
37 | 'iTotalDisplayRecords' => $count, |
||
38 | 'aaData' => $rows |
||
39 | ]); |
||
40 | } |
||
41 | } |
||
42 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.