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

68publishers / tracy-git-version / 5982450498

26 Aug 2023 03:02AM UTC coverage: 90.041% (-2.2%) from 92.276%
5982450498

push

github

tg666
Coverage: using `pcov` instead of `phpdbg`

434 of 482 relevant lines covered (90.04%)

0.9 hits per line

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

77.78
/src/Repository/RuntimeCachedGitRepository.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace SixtyEightPublishers\TracyGitVersion\Repository;
6

7
final class RuntimeCachedGitRepository implements GitRepositoryInterface
8
{
9
    private GitRepositoryInterface $inner;
10

11
    /** @var array<string, mixed> */
12
    private array $cache = [];
13

14
    public function __construct(GitRepositoryInterface $inner)
15
    {
16
        $this->inner = $inner;
1✔
17
    }
1✔
18

19
    public function getSource(): string
20
    {
21
        return $this->inner->getSource();
1✔
22
    }
23

24
    public function isAccessible(): bool
25
    {
26
        return $this->inner->isAccessible();
1✔
27
    }
28

29
    public function addHandler(string $commandClassname, GitCommandHandlerInterface $handler): void
30
    {
31
        $this->inner->addHandler($commandClassname, $handler);
×
32
    }
×
33

34
    public function handle(GitCommandInterface $command)
35
    {
36
        $commandId = (string) $command;
1✔
37

38
        return $this->cache[$commandId] ?? $this->cache[$commandId] = $this->inner->handle($command);
1✔
39
    }
40

41
    public function supports(string $commandClassname): bool
42
    {
43
        return $this->inner->supports($commandClassname);
1✔
44
    }
45
}
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