| 1 | <?php |
||
| 13 | class PyStringYamlParser { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Parse YAML contained in a PyString node. |
||
| 17 | * |
||
| 18 | * @param \Behat\Gherkin\Node\PyStringNode $node |
||
| 19 | * PyString containing text in YAML format. |
||
| 20 | * |
||
| 21 | * @return array |
||
| 22 | * Parsed YAML. |
||
| 23 | */ |
||
| 24 | public function parse(PyStringNode $node) { |
||
| 37 | |||
| 38 | } |
||
| 39 |
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.