| Total Complexity | 10 |
| Total Lines | 76 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 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 |
||
| 81 | } |
||
| 82 | } |