|
20 | 20 | use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryBuilderHelper;
|
21 | 21 | use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
|
22 | 22 | use ApiPlatform\Core\Exception\InvalidArgumentException;
|
| 23 | +use Doctrine\Common\Collections\ArrayCollection; |
23 | 24 | use Doctrine\DBAL\Types\Type as DBALType;
|
| 25 | +use Doctrine\ORM\Query\Parameter; |
24 | 26 | use Doctrine\ORM\QueryBuilder;
|
25 | 27 | use Doctrine\Persistence\ManagerRegistry;
|
| 28 | +use Doctrine\Persistence\Mapping\ClassMetadata; |
26 | 29 | use Psr\Log\LoggerInterface;
|
27 | 30 | use Symfony\Component\HttpFoundation\RequestStack;
|
28 | 31 | use Symfony\Component\PropertyAccess\PropertyAccess;
|
29 | 32 | use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
30 | 33 | use Symfony\Component\Serializer\NameConverter\NameConverterInterface;
|
31 |
| -use Doctrine\Persistence\Mapping\ClassMetadata; |
32 |
| -use Doctrine\ORM\Query\Parameter; |
33 |
| -use Doctrine\Common\Collections\ArrayCollection; |
34 | 34 |
|
35 | 35 | /**
|
36 | 36 | * Filter the collection by given properties.
|
@@ -155,7 +155,7 @@ protected function filterProperty(string $property, $value, QueryBuilder $queryB
|
155 | 155 | $args = [];
|
156 | 156 | $type = $metadata->getTypeOfField($field);
|
157 | 157 |
|
158 |
| - for ($i = 0; $i< \count($values); $i++) { |
| 158 | + for ($i = 0; $i < \count($values); ++$i) { |
159 | 159 | $inQuery[] = ':filterproperty'.$i;
|
160 | 160 | $args[] = new Parameter('filterproperty'.$i, $caseSensitive ? $values[$i] : strtolower($values[$i]), $type);
|
161 | 161 | }
|
|
0 commit comments