| 1 | <?php |
||
| 5 | class MultiQuery |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var \Elasticsearch\Client $client |
||
| 9 | */ |
||
| 10 | protected $elastic; |
||
| 11 | |||
| 12 | protected $queryList = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Логгер |
||
| 16 | * @var \Psr\Log\LoggerInterface $logger |
||
| 17 | */ |
||
| 18 | protected $logger; |
||
| 19 | |||
| 20 | |||
| 21 | public function __construct(\Elasticsearch\Client $elastic) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param Query $query |
||
| 29 | * @return $this |
||
| 30 | */ |
||
| 31 | public function addQuery( Query $query ) { |
||
| 35 | |||
| 36 | public function fetchAll() |
||
| 41 | |||
| 42 | public function getQuery() |
||
| 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.