User::getGitUserName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Entity;
4
5
use Dontdrinkandroot\GitkiBundle\Model\GitUserInterface;
6
use FOS\UserBundle\Model\User as BaseUser;
7
8
class User extends BaseUser implements GitUserInterface
9
{
10
    /**
11
     * @var string
12
     */
13
    private $realName;
14
15
    /**
16
     * @var int
17
     */
18
    private $googleId;
19
20
    /**
21
     * @var int
22
     */
23
    private $githubId;
24
25
    /**
26
     * @var int
27
     */
28
    private $facebookId;
29
30
    public function __construct()
31
    {
32
        BaseUser::__construct();
33
    }
34
35
    /**
36
     * @param int $githubId
37
     */
38
    public function setGithubId($githubId)
39
    {
40
        $this->githubId = $githubId;
41
    }
42
43
    /**
44
     * @return int
45
     */
46
    public function getGithubId()
47
    {
48
        return $this->githubId;
49
    }
50
51
    /**
52
     * @param int $googleId
53
     */
54
    public function setGoogleId($googleId)
55
    {
56
        $this->googleId = $googleId;
57
    }
58
59
    /**
60
     * @return int
61
     */
62
    public function getGoogleId()
63
    {
64
        return $this->googleId;
65
    }
66
67
    /**
68
     * {@inheritdoc}
69
     */
70
    public function getGitUserName()
71
    {
72
        return $this->getRealName();
73
    }
74
75
    /**
76
     * {@inheritdoc}
77
     */
78
    public function getGitUserEmail()
79
    {
80
        return $this->getEmail();
81
    }
82
83
    /**
84
     * @return int
85
     */
86
    public function getFacebookId()
87
    {
88
        return $this->facebookId;
89
    }
90
91
    /**
92
     * @param int $facebookId
93
     */
94
    public function setFacebookId($facebookId)
95
    {
96
        $this->facebookId = $facebookId;
97
    }
98
99
    /**
100
     * @return string
101
     */
102
    public function getRealName()
103
    {
104
        return $this->realName;
105
    }
106
107
    /**
108
     * @param string $realName
109
     */
110
    public function setRealName($realName)
111
    {
112
        $this->realName = $realName;
113
    }
114
115
    public function __toString()
116
    {
117
        $s = 'id=' . $this->getId();
118
        $s .= ',realName=' . $this->getRealName();
119
        $s .= ',email=' . $this->getEmail();
120
121
        return $s;
122
    }
123
}
124