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

systemsdk / docker-symfony-api / #141

03 May 2025 06:15PM UTC coverage: 43.903%. Remained the same
#141

push

DKravtsov
Updated composer dependencies. Added xalan tool for generating phpcpd html report.

1631 of 3715 relevant lines covered (43.9%)

18.94 hits per line

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

0.0
/src/General/Application/Compiler/StopwatchCompilerPass.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace App\General\Application\Compiler;
6

7
use App\General\Application\Decorator\StopwatchDecorator;
8
use Override;
9
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
10
use Symfony\Component\DependencyInjection\ContainerBuilder;
11
use Symfony\Component\DependencyInjection\Definition;
12
use Symfony\Component\DependencyInjection\Reference;
13

14
use function str_starts_with;
15

16
/**
17
 * @package App\General
18
 */
19
class StopwatchCompilerPass implements CompilerPassInterface
20
{
21
    private const array SERVICE_TAGS = [
22
        'security.voter',
23
        'kernel.event_subscriber',
24
        'validator.constraint_validator',
25
        'validator.initializer',
26
        'app.stopwatch',
27
    ];
28

29
    #[Override]
30
    public function process(ContainerBuilder $container): void
31
    {
32
        foreach (self::SERVICE_TAGS as $tag) {
×
33
            foreach ($container->findTaggedServiceIds($tag) as $serviceId => $tags) {
×
34
                if (!str_starts_with($serviceId, 'App')) {
×
35
                    continue;
×
36
                }
37

38
                $definition = new Definition($container->getDefinition($serviceId)->getClass());
×
39
                $definition->setDecoratedService($serviceId);
×
40
                $definition->setFactory([new Reference(StopwatchDecorator::class), 'decorate']);
×
41
                $definition->setArguments([new Reference($serviceId . '.stopwatch.inner')]);
×
42

43
                $container->setDefinition($serviceId . '.stopwatch', $definition);
×
44
            }
45
        }
46
    }
47
}
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