Completed
Push — master ( b390e2...9e506f )
by Philip
02:13
created

User::getFacebookId()   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
3
namespace Dontdrinkandroot\Gitki\WebBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Dontdrinkandroot\GitkiBundle\Model\GitUserInterface;
7
use FOS\UserBundle\Entity\User as BaseUser;
8
9
/**
10
 * User
11
 */
12
class User extends BaseUser implements GitUserInterface
13
{
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->getUsername();
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
    public function __toString()
100
    {
101
        $s = 'id=' . $this->getId();
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $s. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
102
        $s .= ',realName=' . $this->getUsername();
103
        $s .= ',email=' . $this->getEmail();
104
105
        return $s;
106
    }
107
}
108