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

ICanBoogie / bind-routing / 11904921922

19 Nov 2024 02:15AM UTC coverage: 64.571% (-0.4%) from 64.943%
11904921922

push

github

olvlvl
Update boilerplate

3 of 3 new or added lines in 2 files covered. (100.0%)

1 existing line in 1 file now uncovered.

113 of 175 relevant lines covered (64.57%)

0.87 hits per line

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

0.0
/lib/ActionAliasCompilerPass.php
1
<?php
2

3
namespace ICanBoogie\Binding\Routing;
4

5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7

8
/**
9
 * Creates a mapping of action to alias, which is used to forward multiple actions to the same responder.
10
 */
11
final class ActionAliasCompilerPass implements CompilerPassInterface
12
{
13
    public const PARAM = 'routing.action_responder.aliases';
14
    public const TAG = 'action_alias';
15
    public const TAG_KEY = 'action';
16

17
    public function process(ContainerBuilder $container): void
18
    {
19
        $this->process_action_alias($container);
×
20
    }
21

22
    private function process_action_alias(ContainerBuilder $container): void
23
    {
24
        /**
25
         * @var array<string, string> $aliases
26
         *     Where _key_ is an action and _value_ an alias
27
         */
28
        $aliases = [];
×
29

30
        foreach ($container->findTaggedServiceIds(self::TAG) as $id => $tags) {
×
31
            foreach ($tags as $tag) {
×
32
                // @phpstan-ignore-next-line
UNCOV
33
                $aliases[$tag[self::TAG_KEY]] = $id;
×
34
            }
35
        }
36

37
        $container->setParameter(self::PARAM, $aliases);
×
38
    }
39
}
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