| 1 | <?php |
||
| 7 | class Dropdown extends TestableInput |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @property string[]|null |
||
| 11 | */ |
||
| 12 | private $items; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param string[] $items array of items names |
||
| 16 | */ |
||
| 17 | public function withItems(array $items): void |
||
| 21 | |||
| 22 | public function isVisible(AcceptanceTester $I, string $formId): void |
||
| 31 | } |
||
| 32 |
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.