1 | <?php |
||
29 | class StatusWorkingTree extends Status |
||
30 | { |
||
31 | /** |
||
32 | * all files with modified status in the working tree |
||
33 | * |
||
34 | * @return Sequence |
||
35 | */ |
||
36 | 1 | public function all() |
|
47 | |||
48 | /** |
||
49 | * filter files by working tree status |
||
50 | * |
||
51 | * @param string $type |
||
52 | * |
||
53 | * @return Sequence |
||
54 | */ |
||
55 | 1 | protected function filterByType(string $type) |
|
70 | } |
||
71 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.