| 1 | <?php |
||
| 11 | class Dropdown extends TestableInput |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @property string[]|null |
||
| 15 | */ |
||
| 16 | private $items; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @return string |
||
| 20 | */ |
||
| 21 | protected function getSearchSelector(): string |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | protected function getFilterSelector(): string |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $value |
||
| 36 | */ |
||
| 37 | public function setValue(string $value): void |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string[] $items array of items names |
||
| 44 | * @return self |
||
| 45 | */ |
||
| 46 | public function withItems(array $items): Dropdown |
||
| 52 | |||
| 53 | public function isVisible(): void |
||
| 62 | } |
||
| 63 |
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.