1 | <?php |
||
26 | abstract class LogicX implements Specification |
||
27 | { |
||
28 | const AND_X = 'andX'; |
||
29 | |||
30 | const OR_X = 'orX'; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $expression; |
||
36 | |||
37 | /** |
||
38 | * @var Filter[]|QueryModifier[] |
||
39 | */ |
||
40 | private $children; |
||
41 | |||
42 | /** |
||
43 | * Take two or more Expression as parameters. |
||
44 | * |
||
45 | * @param string $expression |
||
46 | * @param Filter|QueryModifier ...$children |
||
47 | */ |
||
48 | public function __construct(string $expression, ...$children) |
||
53 | |||
54 | /** |
||
55 | * @param QueryBuilder $qb |
||
56 | * @param string $context |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public function getFilter(QueryBuilder $qb, string $context): string |
||
87 | |||
88 | /** |
||
89 | * @param QueryBuilder $qb |
||
90 | * @param string $context |
||
91 | */ |
||
92 | public function modify(QueryBuilder $qb, string $context): void |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function filterCollection(iterable $collection): iterable |
||
112 | |||
113 | /** |
||
114 | * {@inheritdoc} |
||
115 | */ |
||
116 | public function isSatisfiedBy($candidate): bool |
||
140 | |||
141 | /** |
||
142 | * Add another child to this logic tree. |
||
143 | * |
||
144 | * @param Filter|QueryModifier $child |
||
145 | */ |
||
146 | protected function append($child): void |
||
150 | } |
||
151 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..