• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 18089958695

29 Sep 2025 07:57AM UTC coverage: 21.569% (-0.2%) from 21.797%
18089958695

push

github

web-flow
fix(openapi): define items type for HydraCollectionBaseSchema hydra:member (#7419)

Co-authored-by: Thibaut Cholley <thibaut.cholley@elsie-sante.fr>

0 of 1 new or added line in 1 file covered. (0.0%)

12063 existing lines in 401 files now uncovered.

11765 of 54545 relevant lines covered (21.57%)

12.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/Doctrine/Orm/Filter/FreeTextQueryFilter.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\Doctrine\Orm\Filter;
15

16
use ApiPlatform\Doctrine\Common\Filter\LoggerAwareInterface;
17
use ApiPlatform\Doctrine\Common\Filter\LoggerAwareTrait;
18
use ApiPlatform\Doctrine\Common\Filter\ManagerRegistryAwareInterface;
19
use ApiPlatform\Doctrine\Common\Filter\ManagerRegistryAwareTrait;
20
use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface;
21
use ApiPlatform\Metadata\BackwardCompatibleFilterDescriptionTrait;
22
use ApiPlatform\Metadata\Operation;
23
use Doctrine\ORM\QueryBuilder;
24

25
final class FreeTextQueryFilter implements FilterInterface, ManagerRegistryAwareInterface, LoggerAwareInterface
26
{
27
    use BackwardCompatibleFilterDescriptionTrait;
28
    use LoggerAwareTrait;
29
    use ManagerRegistryAwareTrait;
30

31
    /**
32
     * @param list<string> $properties an array of properties, defaults to `parameter->getProperties()`
33
     */
34
    public function __construct(private readonly FilterInterface $filter, private readonly ?array $properties = null)
35
    {
UNCOV
36
    }
1✔
37

38
    public function apply(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void
39
    {
UNCOV
40
        if ($this->filter instanceof ManagerRegistryAwareInterface) {
3✔
UNCOV
41
            $this->filter->setManagerRegistry($this->getManagerRegistry());
2✔
42
        }
43

UNCOV
44
        if ($this->filter instanceof LoggerAwareInterface) {
3✔
UNCOV
45
            $this->filter->setLogger($this->getLogger());
2✔
46
        }
47

UNCOV
48
        $parameter = $context['parameter'];
3✔
UNCOV
49
        foreach ($this->properties ?? $parameter->getProperties() ?? [] as $property) {
3✔
UNCOV
50
            $this->filter->apply(
3✔
UNCOV
51
                $queryBuilder,
3✔
UNCOV
52
                $queryNameGenerator,
3✔
UNCOV
53
                $resourceClass,
3✔
UNCOV
54
                $operation,
3✔
UNCOV
55
                ['parameter' => $parameter->withProperty($property)] + $context
3✔
UNCOV
56
            );
3✔
57
        }
58
    }
59
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc