| @@ 10-36 (lines=27) @@ | ||
| 7 | /** |
|
| 8 | * Class GithubBranchId. |
|
| 9 | */ |
|
| 10 | class GithubBranchId implements Identifier |
|
| 11 | { |
|
| 12 | /** @var GithubRepoId */ |
|
| 13 | private $githubRepoId; |
|
| 14 | /** @var string */ |
|
| 15 | private $branchName; |
|
| 16 | ||
| 17 | /** |
|
| 18 | * BranchId constructor. |
|
| 19 | * |
|
| 20 | * @param GithubRepoId $githubRepoId |
|
| 21 | * @param $branchName |
|
| 22 | */ |
|
| 23 | public function __construct(GithubRepoId $githubRepoId, $branchName) |
|
| 24 | { |
|
| 25 | $this->githubRepoId = $githubRepoId; |
|
| 26 | $this->branchName = $branchName; |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @return string |
|
| 31 | */ |
|
| 32 | public function __toString() |
|
| 33 | { |
|
| 34 | return $this->githubRepoId->__toString().'-'.$this->branchName; |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| @@ 10-36 (lines=27) @@ | ||
| 7 | /** |
|
| 8 | * Class GithubTagId. |
|
| 9 | */ |
|
| 10 | class GithubTagId implements Identifier |
|
| 11 | { |
|
| 12 | /** @var GithubRepoId */ |
|
| 13 | private $githubRepoId; |
|
| 14 | /** @var string */ |
|
| 15 | private $tagName; |
|
| 16 | ||
| 17 | /** |
|
| 18 | * BranchId constructor. |
|
| 19 | * |
|
| 20 | * @param GithubRepoId $githubRepoId |
|
| 21 | * @param $tagName |
|
| 22 | */ |
|
| 23 | public function __construct(GithubRepoId $githubRepoId, $tagName) |
|
| 24 | { |
|
| 25 | $this->githubRepoId = $githubRepoId; |
|
| 26 | $this->tagName = $tagName; |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @return string |
|
| 31 | */ |
|
| 32 | public function __toString() |
|
| 33 | { |
|
| 34 | return $this->githubRepoId->__toString().'-'.$this->tagName; |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||