@@ 12-79 (lines=68) @@ | ||
9 | /** |
|
10 | * Class GithubBranchSource. |
|
11 | */ |
|
12 | class GithubBranchSource implements GithubBranch |
|
13 | { |
|
14 | /** @var GithubBranchId */ |
|
15 | private $id; |
|
16 | ||
17 | /** @var GithubRepo */ |
|
18 | private $repo; |
|
19 | ||
20 | /** @var string */ |
|
21 | private $name; |
|
22 | ||
23 | /** @var GithubCommit */ |
|
24 | private $lastCommit; |
|
25 | ||
26 | /** |
|
27 | * GithubBranchSource constructor. |
|
28 | * |
|
29 | * @param GithubBranchId $id |
|
30 | * @param GithubRepo $repo |
|
31 | * @param string $name |
|
32 | * @param GithubCommit $lastCommit |
|
33 | * |
|
34 | * @internal param GithubCommitId $lastCommitId |
|
35 | */ |
|
36 | public function __construct(GithubBranchId $id, GithubRepo $repo, $name, GithubCommit $lastCommit) |
|
37 | { |
|
38 | $this->id = $id; |
|
39 | $this->repo = $repo; |
|
40 | $this->name = $name; |
|
41 | $this->lastCommit = $lastCommit; |
|
42 | } |
|
43 | ||
44 | /** @return GithubBranchId */ |
|
45 | public function getId() |
|
46 | { |
|
47 | return $this->id; |
|
48 | } |
|
49 | ||
50 | /** @return GithubRepoId */ |
|
51 | public function getRepoId() |
|
52 | { |
|
53 | return $this->repo->getId(); |
|
54 | } |
|
55 | ||
56 | /** @return GithubRepo */ |
|
57 | public function getRepo() |
|
58 | { |
|
59 | return $this->repo; |
|
60 | } |
|
61 | ||
62 | /** @return string */ |
|
63 | public function getName() |
|
64 | { |
|
65 | return $this->name; |
|
66 | } |
|
67 | ||
68 | /** @return GithubCommitId */ |
|
69 | public function getLastCommitId() |
|
70 | { |
|
71 | return $this->lastCommit->getId(); |
|
72 | } |
|
73 | ||
74 | /** @return GithubCommit */ |
|
75 | public function getLastCommit() |
|
76 | { |
|
77 | return $this->lastCommit; |
|
78 | } |
|
79 | } |
|
80 |
@@ 12-79 (lines=68) @@ | ||
9 | /** |
|
10 | * Class GithubTagSource. |
|
11 | */ |
|
12 | class GithubTagSource implements GithubTag |
|
13 | { |
|
14 | /** @var GithubTagId */ |
|
15 | private $id; |
|
16 | ||
17 | /** @var GithubRepo */ |
|
18 | private $repo; |
|
19 | ||
20 | /** @var string */ |
|
21 | private $name; |
|
22 | ||
23 | /** @var GithubCommit */ |
|
24 | private $lastCommit; |
|
25 | ||
26 | /** |
|
27 | * GithubTagSource constructor. |
|
28 | * |
|
29 | * @param GithubTagId $id |
|
30 | * @param GithubRepo $repo |
|
31 | * @param string $name |
|
32 | * @param GithubCommit $lastCommit |
|
33 | * |
|
34 | * @internal param GithubCommitId $lastCommitId |
|
35 | */ |
|
36 | public function __construct(GithubTagId $id, GithubRepo $repo, $name, GithubCommit $lastCommit) |
|
37 | { |
|
38 | $this->id = $id; |
|
39 | $this->repo = $repo; |
|
40 | $this->name = $name; |
|
41 | $this->lastCommit = $lastCommit; |
|
42 | } |
|
43 | ||
44 | /** @return GithubTagId */ |
|
45 | public function getId() |
|
46 | { |
|
47 | return $this->id; |
|
48 | } |
|
49 | ||
50 | /** @return GithubRepoId */ |
|
51 | public function getRepoId() |
|
52 | { |
|
53 | return $this->repo->getId(); |
|
54 | } |
|
55 | ||
56 | /** @return GithubRepo */ |
|
57 | public function getRepo() |
|
58 | { |
|
59 | return $this->repo; |
|
60 | } |
|
61 | ||
62 | /** @return string */ |
|
63 | public function getName() |
|
64 | { |
|
65 | return $this->name; |
|
66 | } |
|
67 | ||
68 | /** @return GithubCommitId */ |
|
69 | public function getLastCommitId() |
|
70 | { |
|
71 | return $this->lastCommit->getId(); |
|
72 | } |
|
73 | ||
74 | /** @return GithubCommitId */ |
|
75 | public function getLastCommit() |
|
76 | { |
|
77 | return $this->lastCommit; |
|
78 | } |
|
79 | } |
|
80 |