| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 42 | public function getQuery() |
||
| 43 | { |
||
| 44 | $params = ['body' => []]; |
||
| 45 | foreach ($this->queryList as $query) |
||
| 46 | { |
||
| 47 | $query = $query->getQuery(); |
||
| 48 | $params['body'][] = [ |
||
| 49 | 'index' => $query['index'], |
||
| 50 | 'type' => $query['type'], |
||
| 51 | ]; |
||
| 52 | if (!empty($query['body']['query'])) |
||
| 53 | { |
||
| 54 | $params['body'][] = [ |
||
| 55 | 'query' => $query['body']['query'], |
||
| 56 | ]; |
||
| 57 | } |
||
| 58 | } |
||
| 59 | return $params; |
||
| 60 | } |
||
| 61 | } |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.