1 | <?php |
||
14 | final class SingleSniffFactory |
||
15 | { |
||
16 | /** |
||
17 | * @var ExcludedSniffDataCollector |
||
18 | */ |
||
19 | private $excludedSniffDataCollector; |
||
20 | |||
21 | /** |
||
22 | * @var SniffPropertyValueDataCollector |
||
23 | */ |
||
24 | private $sniffPropertyValueDataCollector; |
||
25 | |||
26 | 14 | public function __construct( |
|
33 | |||
34 | /** |
||
35 | * @return Sniff|null |
||
36 | */ |
||
37 | 9 | public function create(string $sniffClassName) |
|
46 | |||
47 | 8 | private function setCustomSniffPropertyValues(Sniff $sniff) : Sniff |
|
58 | } |
||
59 |
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.