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

tempestphp / tempest-framework / 12021710761

25 Nov 2024 06:54PM UTC coverage: 79.441% (-2.6%) from 81.993%
12021710761

push

github

web-flow
ci: close stale issues and pull requests

7879 of 9918 relevant lines covered (79.44%)

61.32 hits per line

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

55.56
/src/Tempest/Container/src/InitializerDiscovery.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Container;
6

7
use Tempest\Core\Discovery;
8
use Tempest\Core\DiscoveryLocation;
9
use Tempest\Core\IsDiscovery;
10
use Tempest\Reflection\ClassReflector;
11

12
/**
13
 * @property GenericContainer $container
14
 */
15
final class InitializerDiscovery implements Discovery
16
{
17
    use IsDiscovery;
18

19
    public function __construct(
382✔
20
        private readonly Container $container,
21
    ) {
22
    }
382✔
23

24
    public function discover(DiscoveryLocation $location, ClassReflector $class): void
×
25
    {
26
        if (! $class->implements(Initializer::class) && ! $class->implements(DynamicInitializer::class)) {
×
27
            return;
×
28
        }
29

30
        $this->discoveryItems->add($location, $class->getName());
×
31
    }
32

33
    public function apply(): void
382✔
34
    {
35
        foreach ($this->discoveryItems as $className) {
382✔
36
            $this->container->addInitializer($className);
382✔
37
        }
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

© 2026 Coveralls, Inc