1 | <?php |
||
17 | final class ReaderFactory |
||
18 | { |
||
19 | /** |
||
20 | * @var ReaderInterface[] |
||
21 | */ |
||
22 | private static $readers = []; |
||
23 | |||
24 | /** |
||
25 | * @return \BrowscapPHP\Util\Logfile\ReaderCollection |
||
26 | */ |
||
27 | 1 | public static function factory() : ReaderCollection |
|
37 | |||
38 | /** |
||
39 | * @return \BrowscapPHP\Util\Logfile\ReaderInterface[] |
||
40 | */ |
||
41 | 1 | private static function getReaders() : array |
|
51 | } |
||
52 |
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.