Completed
Push — master ( 79f749...714e52 )
by Miro
02:20
created

GithubUserId::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace DevBoardLib\GithubCore\User;
4
5
use DevBoardLib\GithubCore\Identifier;
6
7
/**
8
 * Class GithubUserId.
9
 */
10
class GithubUserId implements Identifier
11
{
12
    /**
13
     * @var
14
     */
15
    private $githubUserId;
16
17
    /**
18
     * UserId constructor.
19
     *
20
     * @param $githubUserId
21
     */
22
    public function __construct(int $githubUserId)
23
    {
24
        $this->githubUserId = $githubUserId;
25
    }
26
27
    /**
28
     * @return int
29
     */
30
    public function getId() : int
31
    {
32
        return $this->githubUserId;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function __toString()
39
    {
40
        return (string) $this->githubUserId;
41
    }
42
}
43