| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function isVisible(AcceptanceTester $I, string $formId): void |
||
| 23 | { |
||
| 24 | $I->seeElement("//form[@id='$formId']//select", ['id' => $this->name]); |
||
| 25 | if ($this->items) { |
||
|
|
|||
| 26 | foreach ($this->items as $item) { |
||
| 27 | $I->see($item, "//form[@id='$formId']//select[@id='$this->name']/option"); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | } |
||
| 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.