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

api-platform / core / 14922365773

09 May 2025 05:50AM UTC coverage: 6.886% (-1.6%) from 8.457%
14922365773

Pull #7134

github

web-flow
Merge ebf237e3f into 613bb5b75
Pull Request #7134: refactor(metadata): type parameters to list<string>|string

46 of 132 new or added lines in 15 files covered. (34.85%)

1 existing line in 1 file now uncovered.

10914 of 158496 relevant lines covered (6.89%)

6.26 hits per line

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

0.0
/tests/Fixtures/TestBundle/ApiResource/WithSecurityParameter.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\Tests\Fixtures\TestBundle\ApiResource;
15

16
use ApiPlatform\Metadata\GetCollection;
17
use ApiPlatform\Metadata\HeaderParameter;
18
use ApiPlatform\Metadata\QueryParameter;
19
use Symfony\Component\TypeInfo\Type\BuiltinType;
20
use Symfony\Component\TypeInfo\TypeIdentifier;
21

22
#[GetCollection(
23
    uriTemplate: 'with_security_parameters_collection{._format}',
×
24
    parameters: [
×
25
        'name' => new QueryParameter(security: 'is_granted("ROLE_ADMIN")'),
×
NEW
26
        'auth' => new HeaderParameter(security: '"secured" == auth', nativeType: new BuiltinType(TypeIdentifier::STRING)),
×
NEW
27
        'secret' => new QueryParameter(security: '"secured" == secret', nativeType: new BuiltinType(TypeIdentifier::STRING)),
×
28
    ],
×
29
    provider: [self::class, 'collectionProvider'],
×
30
)]
×
31
class WithSecurityParameter
32
{
33
    public static function collectionProvider()
34
    {
35
        return [new self()];
×
36
    }
37
}
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

© 2025 Coveralls, Inc