| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | protected function attrs(): array |
||
| 33 | { |
||
| 34 | $attrs = parent::attrs(); |
||
| 35 | $attrs['layout'] = $this->layout; |
||
| 36 | $attrs['extensionType'] = $this->extensionType; |
||
| 37 | $attrs['extensionKey'] = $this->extensionKey; |
||
| 38 | if ($this->parameters) { |
||
|
|
|||
| 39 | $attrs['parameters'] = $this->parameters; |
||
| 40 | } |
||
| 41 | $attrs['localId'] = $this->localId; |
||
| 42 | |||
| 43 | return $attrs; |
||
| 44 | } |
||
| 46 |
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.