| 1 | <?php |
||
| 5 | class ConfigurationRepository extends \SimpleXMLElement implements ConfigInterface |
||
| 6 | { |
||
| 7 | |||
| 8 | const CONTEXT_DEFAULT = 'default'; |
||
| 9 | |||
| 10 | protected static $allowedTrues = [ |
||
| 11 | true, 'true', 1, '1', 'on', 'yes' |
||
| 12 | ]; |
||
| 13 | |||
| 14 | 1 | public function hasValue($path) |
|
| 24 | |||
| 25 | 10 | public function getValue($path) |
|
| 36 | |||
| 37 | 2 | public function getValueFlag($path) |
|
| 47 | } |
||
| 48 |
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.