| Total Complexity | 5 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 8 | class Extras extends \XoopsObject |
||
| 9 | { |
||
| 10 | public $handler; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Extras constructor. |
||
| 14 | * @param $fields |
||
| 15 | */ |
||
| 16 | public function __construct($fields) |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Initiate variables |
||
| 24 | * @param array $fields field information array of {@link \XoopsObjectsField} objects |
||
| 25 | */ |
||
| 26 | public function init($fields): void |
||
| 35 |
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.