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

GithubUserId   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getId() 0 4 1
A __toString() 0 4 1
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