| 1 | <?php |
||
| 8 | class ConstrainedRelationDefinition extends RelationDefinition implements IRelationDefinition |
||
| 9 | { |
||
| 10 | private $baseRelDef; |
||
| 11 | private $cond; |
||
| 12 | private $args; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param IRelationDefinition $relationDefinition definition of relation to constrain |
||
| 16 | * @param ISqlPredicate|SqlPattern|string $cond |
||
| 17 | * @param array $args |
||
| 18 | */ |
||
| 19 | public function __construct(IRelationDefinition $relationDefinition, $cond, ...$args) |
||
| 30 | |||
| 31 | public function toSql(ITypeDictionary $typeDictionary): string |
||
| 44 | } |
||
| 45 |
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.