Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
26 | public function testEmpty(): void |
||
27 | { |
||
28 | $filter = new DateTimeRangeFilter(); |
||
29 | $filter->initialize('field_name', ['field_options' => ['class' => 'FooBar']]); |
||
30 | |||
31 | $builder = new ProxyQuery(new QueryBuilder()); |
||
|
|||
32 | |||
33 | $filter->filter($builder, 'alias', 'field', null); |
||
34 | $filter->filter($builder, 'alias', 'field', ''); |
||
35 | |||
36 | $this->assertEquals([], $builder->query); |
||
37 | $this->assertFalse($filter->isActive()); |
||
38 | } |
||
39 | |||
45 |
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: