| Total Complexity | 5 |
| Total Lines | 69 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class DeferredEntityLoader |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var EntityLoader |
||
| 13 | */ |
||
| 14 | protected $entityLoader; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var EntitiesArgumentConverter |
||
| 18 | */ |
||
| 19 | protected $entitiesArgumentConverter; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var AssociationTree |
||
| 23 | */ |
||
| 24 | protected $associationTree; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string|null |
||
| 28 | */ |
||
| 29 | protected $entityClassName; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var array |
||
| 33 | */ |
||
| 34 | protected $entities = []; |
||
| 35 | |||
| 36 | public function __construct( |
||
| 46 | } |
||
| 47 | |||
| 48 | public function createDeferred(iterable $entities, \Closure $resolveCallback): Deferred |
||
| 59 | } |
||
| 60 | ); |
||
| 61 | } |
||
| 62 | |||
| 63 | protected function load(): void |
||
| 80 |
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.