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

api-platform / core / 13175309672

06 Feb 2025 09:04AM UTC coverage: 7.663% (-0.2%) from 7.841%
13175309672

push

github

web-flow
fix: ensure template files have a tpl file extension (#6826) (#6829)

2 of 5 new or added lines in 4 files covered. (40.0%)

3676 existing lines in 122 files now uncovered.

13073 of 170593 relevant lines covered (7.66%)

27.3 hits per line

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

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

16
use ApiPlatform\GraphQl\Resolver\QueryItemResolverInterface;
17

18
final class SecurityAfterResolverResolver implements QueryItemResolverInterface
19
{
20
    /**
21
     * @param object|null $item
22
     * @param mixed[]     $context
23
     */
24
    public function __invoke($item, array $context): SecurityAfterResolver
25
    {
26
        $idUrl = $context['args']['id'];
×
27

UNCOV
28
        if (str_contains($idUrl, '2')) {
×
29
            // Unknown to simulate a 403 error
UNCOV
30
            return new SecurityAfterResolver('2', 'nonexistent');
×
31
        }
32

UNCOV
33
        return new SecurityAfterResolver('1', 'test');
×
34
    }
35
}
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