• 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/Mapper/src/MapperDiscovery.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Mapper;
6

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

12
final class MapperDiscovery implements Discovery
13
{
14
    use IsDiscovery;
15

16
    public function __construct(
382✔
17
        private readonly MapperConfig $config,
18
    ) {
19
    }
382✔
20

21
    public function discover(DiscoveryLocation $location, ClassReflector $class): void
×
22
    {
23
        if (! $class->implements(Mapper::class)) {
×
24
            return;
×
25
        }
26

27
        $this->discoveryItems->add($location, $class->getName());
×
28
    }
29

30
    public function apply(): void
382✔
31
    {
32
        foreach ($this->discoveryItems as $className) {
382✔
33
            $this->config->mappers[] = $className;
382✔
34
        }
35
    }
36
}
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