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

mborne / git-manager / 20936283207

12 Jan 2026 09:52PM UTC coverage: 57.44% (-6.1%) from 63.576%
20936283207

push

github

mborne
fix: missing return type

193 of 336 relevant lines covered (57.44%)

0.58 hits per line

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

50.0
/src/Filesystem/LocalFilesystem.php
1
<?php
2

3
namespace MBO\GitManager\Filesystem;
4

5
use Gitonomy\Git\Repository as GitRepository;
6
use League\Flysystem\Filesystem as LeagueFilesystem;
7
use League\Flysystem\Local\LocalFilesystemAdapter;
8
use MBO\GitManager\Entity\Project;
9
use Psr\Log\LoggerInterface;
10

11
/**
12
 * Local data directory.
13
 */
14
class LocalFilesystem extends LeagueFilesystem
15
{
16
    public function __construct(
17
        private string $dataDir,
18
        LoggerInterface $logger,
19
    ) {
20
        parent::__construct(new LocalFilesystemAdapter($dataDir));
1✔
21
        $logger->info(sprintf('[LocalFilesystem] %s ', $dataDir));
1✔
22
        if (!$this->directoryExists('.trivy')) {
1✔
23
            $logger->info('create .trivy directory');
×
24
            $this->createDirectory('.trivy');
×
25
        }
26
    }
27

28
    /**
29
     * Get path to root directory.
30
     */
31
    public function getRootPath(): string
32
    {
33
        return $this->dataDir;
1✔
34
    }
35

36
    /**
37
     * Get GIT repository's path for a project given by its fullname.
38
     */
39
    public function getGitRepositoryPath(string $fullname): string
40
    {
41
        return $this->dataDir.DIRECTORY_SEPARATOR.$fullname;
1✔
42
    }
43

44
    /**
45
     * Get GitRepository for a project given by its fullname.
46
     */
47
    public function getGitRepository(string $fullname): GitRepository
48
    {
49
        return new GitRepository($this->getGitRepositoryPath($fullname));
1✔
50
    }
51

52
    /**
53
     * Get path for the trivy report.
54
     */
55
    public function getTrivyReportPath(Project $project): string
56
    {
57
        return implode(
×
58
            DIRECTORY_SEPARATOR,
×
59
            [$this->getRootPath(), '.trivy', (string) $project->getId().'.json']
×
60
        );
×
61
    }
62
}
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