| 1 | <?php |
||
| 5 | class FilterBetween implements FilterInterface |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | protected $table; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $columns; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $dates; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Construct |
||
| 24 | * |
||
| 25 | * @param string $table |
||
| 26 | * @param array $columns |
||
| 27 | * @param array $dates |
||
| 28 | */ |
||
| 29 | 15 | public function __construct($table, $columns, $dates) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Filter |
||
| 38 | * |
||
| 39 | * @param Query\Builder $query |
||
| 40 | * @param int|string $key |
||
| 41 | * @param mixed $value |
||
| 42 | * |
||
| 43 | * @return boolean |
||
| 44 | */ |
||
| 45 | 14 | public function filter($query, $key, $value) |
|
| 68 | } |
||
| 69 |
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.