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

api-platform / core / 6067528200

04 Sep 2023 12:12AM UTC coverage: 36.875% (-21.9%) from 58.794%
6067528200

Pull #5791

github

web-flow
Merge 64157e578 into d09cfc9d2
Pull Request #5791: fix: strip down any sql function name

3096 of 3096 new or added lines in 205 files covered. (100.0%)

9926 of 26918 relevant lines covered (36.87%)

6.5 hits per line

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

0.0
/src/Metadata/Tests/Fixtures/State/RelationMultipleProvider.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\Metadata\Tests\Fixtures\State;
15

16
use ApiPlatform\Metadata\GetCollection;
17
use ApiPlatform\Metadata\Operation;
18
use ApiPlatform\State\ProviderInterface;
19
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\Dummy;
20
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\RelationMultiple;
21

22
class RelationMultipleProvider implements ProviderInterface
23
{
24
    /**
25
     * {@inheritDoc}
26
     */
27
    public function provide(Operation $operation, array $uriVariables = [], array $context = []): array|object|null
28
    {
29
        $firstDummy = new Dummy();
×
30
        $firstDummy->setId($uriVariables['firstId']);
×
31
        $secondDummy = new Dummy();
×
32
        $relationMultiple = new RelationMultiple();
×
33
        $relationMultiple->id = 1;
×
34
        $relationMultiple->first = $firstDummy;
×
35
        $relationMultiple->second = $secondDummy;
×
36

37
        if ($operation instanceof GetCollection) {
×
38
            $secondDummy->setId(2);
×
39
            $thirdDummy = new Dummy();
×
40
            $thirdDummy->setId(3);
×
41
            $relationMultiple2 = new RelationMultiple();
×
42
            $relationMultiple2->id = 2;
×
43
            $relationMultiple2->first = $firstDummy;
×
44
            $relationMultiple2->second = $thirdDummy;
×
45

46
            return [$relationMultiple, $relationMultiple2];
×
47
        }
48

49
        $relationMultiple->second->setId($uriVariables['secondId']);
×
50

51
        return $relationMultiple;
×
52
    }
53
}
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