Repository   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 76
ccs 0
cts 25
cp 0
rs 10
c 0
b 0
f 0
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getUpdatedAt() 0 3 1
A setCreatedAt() 0 5 1
A setUpdatedAt() 0 5 1
A getCreatedAt() 0 3 1
A setSlug() 0 5 1
A setProject() 0 5 1
A getName() 0 3 1
A setName() 0 5 1
A getSlug() 0 3 1
A getProject() 0 3 1
1
<?php
2
3
namespace App\Model\Project;
4
5
abstract class Repository
6
{
7
    /** @var string **/
8
    protected $name;
9
    /** @var string **/
10
    protected $slug;
11
	/** @var Project **/
12
	protected $project;
13
    /** @var \DateTime **/
14
    protected $createdAt;
15
    /** @var \DateTime **/
16
    protected $updatedAt;
17
	
18
	const TYPE_GITHUB = 'github';
19
    const TYPE_GITLAB = 'gitlab';
20
	
21
	abstract public function getType(): string;
22
	
23
    public function setName(string $name): Repository
24
    {
25
        $this->name = $name;
26
        
27
        return $this;
28
    }
29
    
30
    public function getName(): string
31
    {
32
        return $this->name;
33
    }
34
    
35
    public function setSlug(string $slug): Repository
36
    {
37
        $this->slug = $slug;
38
        
39
        return $this;
40
    }
41
    
42
    public function getSlug(): string
43
    {
44
        return $this->slug;
45
    }
46
    
47
	public function setProject(Project $project): Repository
48
	{
49
		$this->project = $project;
50
		
51
		return $this;
52
	}
53
	
54
	public function getProject(): Project
55
	{
56
		return $this->project;
57
	}
58
    
59
    public function setCreatedAt(\DateTime $createdAt): Repository
60
    {
61
        $this->createdAt = $createdAt;
62
        
63
        return $this;
64
    }
65
    
66
    public function getCreatedAt(): \DateTime
67
    {
68
        return $this->createdAt;
69
    }
70
    
71
    public function setUpdatedAt(\DateTime $updatedAt): Repository
72
    {
73
        $this->updatedAt = $updatedAt;
74
        
75
        return $this;
76
    }
77
    
78
    public function getUpdatedAt(): \DateTime
79
    {
80
        return $this->updatedAt;
81
    }
82
}