| 1 | <?php |
||
| 18 | class Dropdown extends TestableInput |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @property string[]|null |
||
| 22 | */ |
||
| 23 | private $items; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @return string |
||
| 27 | */ |
||
| 28 | protected function getSearchSelector(): string |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return string |
||
| 35 | */ |
||
| 36 | protected function getFilterSelector(): string |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param string $value |
||
| 43 | */ |
||
| 44 | public function setValue(string $value): void |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param string[] $items array of items names |
||
| 51 | * @return self |
||
| 52 | */ |
||
| 53 | public function withItems(array $items): Dropdown |
||
| 59 | |||
| 60 | public function isVisible(): void |
||
| 69 | } |
||
| 70 |
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.