Completed
Pull Request — master (#3464)
by Julito
14:18 queued 01:15
created

Admin::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * Admin.
11
 *
12
 * @ORM\Table(name="admin", uniqueConstraints={@ORM\UniqueConstraint(name="user_id", columns={"user_id"})})
13
 * @ORM\Entity
14
 */
15
class Admin
16
{
17
    /**
18
     * @var int
19
     *
20
     * @ORM\Column(name="id", type="integer")
21
     * @ORM\Id
22
     * @ORM\GeneratedValue(strategy="IDENTITY")
23
     */
24
    protected $id;
25
26
    /**
27
     * @ORM\OneToOne (
28
     *     targetEntity="Chamilo\CoreBundle\Entity\User",
29
     *     inversedBy="admin"
30
     * )
31
     * @ORM\JoinColumn(
32
     *     name="user_id",
33
     *     referencedColumnName="id",
34
     *     onDelete="CASCADE")
35
     */
36
    protected $user;
37
38
    /**
39
     * Get user.
40
     *
41
     */
42
    public function getUser(): User
43
    {
44
        return $this->user;
45
    }
46
47
    /**
48
     * Set user.
49
     *
50
     */
51
    public function setUser($user)
52
    {
53
        $this->user = $user;
54
55
        return $this;
56
    }
57
58
    /**
59
     * Get id.
60
     *
61
     * @return int
62
     */
63
    public function getId()
64
    {
65
        return $this->id;
66
    }
67
}
68