Completed
Push — master ( 6873e8...20cc66 )
by Miro
02:52 queued 48s
created

GithubUserSource::getAvatarUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace DevBoardLib\GithubCore\User;
3
4
use DevBoardLib\GithubCore\User\GithubUser;
5
use DevBoardLib\GithubCore\User\GithubUserId;
6
7
class GithubUserSource implements GithubUser
8
{
9
    /** @var GithubUserId */
10
    private $githubUserId;
11
    /** @var string */
12
    private $username;
13
    /** @var string */
14
    private $email;
15
    /** @var string */
16
    private $name;
17
    /** @var string */
18
    private $avatarUrl;
19
20
    /**
21
     * GithubUserSource constructor.
22
     *
23
     * @param GithubUserId $githubUserId
24
     * @param string       $username
25
     * @param string       $email
26
     * @param string       $name
27
     * @param string       $avatarUrl
28
     */
29
    public function __construct(GithubUserId $githubUserId, $username, $email = null, $name = null, $avatarUrl)
30
    {
31
        $this->githubUserId = $githubUserId;
32
        $this->username     = $username;
33
        $this->email        = $email;
34
        $this->name         = $name;
35
        $this->avatarUrl    = $avatarUrl;
36
    }
37
38
    /**
39
     * @return GithubUserId
40
     */
41
    public function getGithubUserId()
42
    {
43
        return $this->githubUserId;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getUsername()
50
    {
51
        return $this->username;
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getEmail()
58
    {
59
        return $this->email;
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getName()
66
    {
67
        return $this->name;
68
    }
69
70
    /**
71
     * @return string
72
     */
73
    public function getAvatarUrl()
74
    {
75
        return $this->avatarUrl;
76
    }
77
}
78