Code Duplication    Length = 49-49 lines in 2 locations

src/Branch/GithubBranchSource.php 1 location

@@ 11-59 (lines=49) @@
8
/**
9
 * Class GithubBranchSource.
10
 */
11
class GithubBranchSource implements GithubBranch
12
{
13
    /** @var GithubRepoId */
14
    private $githubRepoId;
15
16
    /** @var string */
17
    private $name;
18
19
    /** @var GithubCommit */
20
    private $lastCommit;
21
22
    /**
23
     * GithubBranchSource constructor.
24
     *
25
     * @param GithubRepoId $githubRepoId
26
     * @param string       $name
27
     * @param GithubCommit $lastCommit
28
     */
29
    public function __construct(GithubRepoId $githubRepoId, string $name, GithubCommit $lastCommit)
30
    {
31
        $this->githubRepoId = $githubRepoId;
32
        $this->name         = $name;
33
        $this->lastCommit   = $lastCommit;
34
    }
35
36
    /**
37
     * @return GithubRepoId
38
     */
39
    public function getGithubRepoId() : GithubRepoId
40
    {
41
        return $this->githubRepoId;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getName() : string
48
    {
49
        return $this->name;
50
    }
51
52
    /**
53
     * @return GithubCommit
54
     */
55
    public function getLastCommit() : GithubCommit
56
    {
57
        return $this->lastCommit;
58
    }
59
}
60

src/Tag/GithubTagSource.php 1 location

@@ 11-59 (lines=49) @@
8
/**
9
 * Class GithubTagSource.
10
 */
11
class GithubTagSource implements GithubTag
12
{
13
    /** @var GithubRepoId */
14
    private $githubRepoId;
15
16
    /** @var string */
17
    private $name;
18
19
    /** @var GithubCommit */
20
    private $lastCommit;
21
22
    /**
23
     * GithubBranchSource constructor.
24
     *
25
     * @param GithubRepoId $githubRepoId
26
     * @param string       $name
27
     * @param GithubCommit $lastCommit
28
     */
29
    public function __construct(GithubRepoId $githubRepoId, string $name, GithubCommit $lastCommit)
30
    {
31
        $this->githubRepoId = $githubRepoId;
32
        $this->name         = $name;
33
        $this->lastCommit   = $lastCommit;
34
    }
35
36
    /**
37
     * @return GithubRepoId
38
     */
39
    public function getGithubRepoId() : GithubRepoId
40
    {
41
        return $this->githubRepoId;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getName() : string
48
    {
49
        return $this->name;
50
    }
51
52
    /**
53
     * @return GithubCommit
54
     */
55
    public function getLastCommit() : GithubCommit
56
    {
57
        return $this->lastCommit;
58
    }
59
}
60