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

mborne / git-manager / 14820042690

04 May 2025 09:55AM UTC coverage: 63.816% (-2.1%) from 65.942%
14820042690

push

github

web-flow
Merge pull request #35 from mborne/34-database

(closes #34)

67 of 86 new or added lines in 7 files covered. (77.91%)

7 existing lines in 1 file now uncovered.

194 of 304 relevant lines covered (63.82%)

0.64 hits per line

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

70.0
/src/Entity/Project.php
1
<?php
2

3
namespace MBO\GitManager\Entity;
4

5
use Doctrine\ORM\Mapping as ORM;
6
use MBO\GitManager\Repository\ProjectRepository;
7
use Symfony\Bridge\Doctrine\Types\UuidType;
8
use Symfony\Component\Uid\Uuid;
9

10
#[ORM\Entity(repositoryClass: ProjectRepository::class)]
11
class Project
12
{
13
    /**
14
     * UUID V3 computed using project URL.
15
     */
16
    #[ORM\Id]
17
    #[ORM\Column(type: UuidType::NAME, unique: true)]
18
    private Uuid $id;
19

20
    /**
21
     * The project name with namespaces (ex : mborne/git-manager).
22
     */
23
    #[ORM\Column(length: 255)]
24
    private string $name;
25

26
    /**
27
     * The URL of the project (ex : "https://github.com/mborne/git-manager").
28
     */
29
    #[ORM\Column(length: 512)]
30
    private string $httpUrl;
31

32
    /**
33
     * The full name of a project (ex : "github.com/mborne/git-manager").
34
     */
35
    #[ORM\Column(length: 255)]
36
    private string $fullName;
37

38
    /**
39
     * The default branch.
40
     */
41
    #[ORM\Column(length: 100, nullable: true)]
42
    private ?string $defaultBranch = null;
43

44
    /**
45
     * True if the repository is archived.
46
     */
47
    #[ORM\Column(nullable: false)]
48
    private bool $archived;
49

50
    /**
51
     * public, private or internal.
52
     */
53
    #[ORM\Column(length: 30, nullable: true)]
54
    private ?string $visibility;
55

56
    /**
57
     * Last clone or fetch date.
58
     */
59
    #[ORM\Column(type: 'datetime')]
60
    private \DateTime $fetchedAt;
61

62
    /**
63
     * Metadata about git repository (size, tags, branchNames, activity,...).
64
     *
65
     * @var array<string,mixed>
66
     */
67
    #[ORM\Column(type: 'json')]
68
    private array $metadata = [];
69

70
    /**
71
     * Checker results (license, trivy, ).
72
     *
73
     * @var array<string,mixed>
74
     */
75
    #[ORM\Column(type: 'json')]
76
    private array $checks = [];
77

78
    public function getId(): Uuid
79
    {
NEW
80
        return $this->id;
×
81
    }
82

83
    public function setId(Uuid $id): static
84
    {
85
        $this->id = $id;
1✔
86

87
        return $this;
1✔
88
    }
89

90
    public function getName(): string
91
    {
NEW
92
        return $this->name;
×
93
    }
94

95
    public function setName(string $name): static
96
    {
97
        $this->name = $name;
1✔
98

99
        return $this;
1✔
100
    }
101

102
    public function getHttpUrl(): string
103
    {
NEW
104
        return $this->httpUrl;
×
105
    }
106

107
    public function setHttpUrl(string $httpUrl): static
108
    {
109
        $this->httpUrl = $httpUrl;
1✔
110

111
        return $this;
1✔
112
    }
113

114
    public function getDefaultBranch(): ?string
115
    {
NEW
116
        return $this->defaultBranch;
×
117
    }
118

119
    public function setDefaultBranch(?string $defaultBranch): static
120
    {
121
        $this->defaultBranch = $defaultBranch;
1✔
122

123
        return $this;
1✔
124
    }
125

126
    public function isArchived(): bool
127
    {
NEW
128
        return $this->archived;
×
129
    }
130

131
    public function setArchived(bool $archived): static
132
    {
133
        $this->archived = $archived;
1✔
134

135
        return $this;
1✔
136
    }
137

138
    public function getVisibility(): ?string
139
    {
NEW
140
        return $this->visibility;
×
141
    }
142

143
    public function setVisibility(?string $visibility): static
144
    {
145
        $this->visibility = $visibility;
1✔
146

147
        return $this;
1✔
148
    }
149

150
    public function getFullName(): string
151
    {
152
        return $this->fullName;
1✔
153
    }
154

155
    public function setFullName(string $fullName): static
156
    {
157
        $this->fullName = $fullName;
1✔
158

159
        return $this;
1✔
160
    }
161

162
    public function getFetchedAt(): \DateTime
163
    {
NEW
164
        return $this->fetchedAt;
×
165
    }
166

167
    public function setFetchedAt(\DateTime $fetchedAt): static
168
    {
169
        $this->fetchedAt = $fetchedAt;
1✔
170

171
        return $this;
1✔
172
    }
173

174
    /**
175
     * @return array<string,mixed>
176
     */
177
    public function getMetadata(): array
178
    {
NEW
179
        return $this->metadata;
×
180
    }
181

182
    /**
183
     * @param array<string,mixed> $metadata
184
     */
185
    public function setMetadata(array $metadata): static
186
    {
187
        $this->metadata = $metadata;
1✔
188

189
        return $this;
1✔
190
    }
191

192
    /**
193
     * @return array<string,mixed>
194
     */
195
    public function getChecks(): array
196
    {
NEW
197
        return $this->checks;
×
198
    }
199

200
    /**
201
     * @param array<string,mixed> $checks
202
     */
203
    public function setChecks(array $checks): static
204
    {
205
        $this->checks = $checks;
1✔
206

207
        return $this;
1✔
208
    }
209
}
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