Failed Conditions
Push — preview-1.19.0 ( 7438ce...cca8d0 )
by Guilherme
12:04
created

AuthCode   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 51
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getIdToken() 0 3 1
A getSessionId() 0 3 1
A setIdToken() 0 4 1
A setSessionId() 0 4 1
1
<?php
2
/**
3
 * This file is part of the login-cidadao project or it's bundles.
4
 *
5
 * (c) Guilherme Donato <guilhermednt on github>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace LoginCidadao\OAuthBundle\Entity;
12
13
use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
14
use Doctrine\ORM\Mapping as ORM;
15
16
/**
17
 * @ORM\Entity
18
 * @ORM\Table(name="auth_code")
19
 * @ORM\AttributeOverrides({
20
 *      @ORM\AttributeOverride(name="scope",
21
 *              column=@ORM\Column(
22
 *              name     = "scope",
23
 *              type     = "string",
24
 *              length   = 1000,
25
 *              nullable = true
26
 *          )
27
 *      )
28
 * })
29
 */
30
class AuthCode extends BaseAuthCode
31
{
32
    /**
33
     * @ORM\Id
34
     * @ORM\Column(type="integer")
35
     * @ORM\GeneratedValue(strategy="AUTO")
36
     */
37
    protected $id;
38
39
    /**
40
     * @ORM\ManyToOne(targetEntity="Client")
41
     * @ORM\JoinColumn(nullable=false)
42
     */
43
    protected $client;
44
45
    /**
46
     * @ORM\ManyToOne(targetEntity="LoginCidadao\CoreBundle\Entity\Person")
47
     * @ORM\JoinColumn(onDelete="CASCADE")
48
     */
49
    protected $user;
50
51
    /**
52
     * @ORM\Column(name="id_token", type="text", nullable=true)
53
     */
54
    protected $idToken;
55
56
    /**
57
     * @ORM\Column(name="session_id", type="string", length=255, nullable=true)
58
     */
59
    protected $sessionId;
60
61 1
    public function getIdToken()
62
    {
63 1
        return $this->idToken;
64
    }
65
66 1
    public function setIdToken($idToken)
67
    {
68 1
        $this->idToken = $idToken;
69 1
        return $this;
70
    }
71
72 1
    public function getSessionId()
73
    {
74 1
        return $this->sessionId;
75
    }
76
77 1
    public function setSessionId($sessionId)
78
    {
79 1
        $this->sessionId = $sessionId;
80 1
        return $this;
81
    }
82
}
83