1 | <?php |
||
22 | class QueryEndpoint extends AbstractSearchEndpoint implements OrderedNormalizerInterface |
||
23 | { |
||
24 | /** |
||
25 | * Endpoint name |
||
26 | */ |
||
27 | const NAME = 'query'; |
||
28 | |||
29 | /** |
||
30 | * @var BoolQuery |
||
31 | */ |
||
32 | private $bool; |
||
33 | |||
34 | /** |
||
35 | * @var bool |
||
36 | */ |
||
37 | private $filtersSet = false; |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function normalize(NormalizerInterface $normalizer, $format = null, array $context = []) |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function add(BuilderInterface $builder, $key = null) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function addToBool(BuilderInterface $builder, $boolType = null, $key = null) |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function getOrder() |
||
85 | |||
86 | /** |
||
87 | * @return BoolQuery |
||
88 | */ |
||
89 | public function getBool() |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function getAll($boolType = null) |
||
101 | } |
||
102 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: