| 1 | <?php |
||
| 5 | class Type extends FieldContainer |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var array |
||
| 9 | */ |
||
| 10 | private $interfaces = []; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | private $values; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @return array |
||
| 19 | */ |
||
| 20 | public function getInterfaces() |
||
| 21 | { |
||
| 22 | return $this->interfaces; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param array $interfaces |
||
| 27 | * @return $this |
||
| 28 | */ |
||
| 29 | public function setInterfaces(array $interfaces) |
||
| 30 | { |
||
| 31 | $this->interfaces = $interfaces; |
||
| 32 | |||
| 33 | return $this; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | public function getValues() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param array $values |
||
| 46 | * @return $this |
||
| 47 | */ |
||
| 48 | public function setValues(array $values) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritdoc} |
||
| 58 | */ |
||
| 59 | public function toMapping() |
||
| 72 | } |
||
| 73 |
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.