Completed
Pull Request — master (#20)
by Miro
02:18
created

GithubCommitSha   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 23
wmc 2
lcom 0
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 4 1
1
<?php
2
namespace DevBoardLib\GithubCore\Commit;
3
4
use DevBoardLib\GithubCore\Identifier;
5
6
/**
7
 * Class GithubCommitSha.
8
 */
9
class GithubCommitSha implements Identifier
10
{
11
    /** @var string */
12
    private $commitSha;
13
14
    /**
15
     * BranchId constructor.
16
     *
17
     * @param $commitSha
18
     */
19
    public function __construct($commitSha)
20
    {
21
        $this->commitSha = $commitSha;
22
    }
23
24
    /**
25
     * @return string
26
     */
27
    public function __toString()
28
    {
29
        return (string) $this->commitSha;
30
    }
31
}
32