Total Complexity | 7 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 90.91% |
Changes | 0 |
1 | <?php |
||
16 | class HasMany extends OneOrMany |
||
17 | { |
||
18 | /** |
||
19 | * {@inheritdoc} |
||
20 | */ |
||
21 | protected $saveStrategy = self::SAVE_STRATEGY_REPLACE; |
||
22 | |||
23 | /** |
||
24 | * Store the relation query for optimisation purpose |
||
25 | * |
||
26 | * @var KeyValueQuery |
||
27 | */ |
||
28 | private $relationQuery; |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | 25 | protected function getForeignInfos(): array |
|
36 | } |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | 65 | protected function relationQuery($keys, $constraints): ReadCommandInterface |
|
62 |
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.