| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 48 | public function createDeferred(iterable $entities, \Closure $resolveCallback): Deferred |
||
| 49 | { |
||
| 50 | foreach ($entities as $entity) { |
||
| 51 | $this->entities[] = $entity; |
||
| 52 | } |
||
| 53 | |||
| 54 | return new Deferred( |
||
| 55 | function () use ($resolveCallback) { |
||
| 56 | $this->load(); |
||
| 57 | |||
| 58 | return $resolveCallback(); |
||
| 59 | } |
||
| 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.