User::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace DoctrineORMModuleTest\Assets\GraphEntity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Doctrine\Common\Collections\ArrayCollection;
7
8
/**
9
 * Part of the test assets used to produce a demo of graphs in the Laminas Developer Tools integration
10
 *
11
 * @license MIT
12
 * @link    http://www.doctrine-project.org/
13
 * @author  Marco Pivetta <[email protected]>
14
 *
15
 * @ORM\Entity()
16
 */
17
class User
18
{
19
    /**
20
     * @var int
21
     * @ORM\Id()
22
     * @ORM\GeneratedValue(strategy="AUTO")
23
     * @ORM\Column(type="integer")
24
     */
25
    protected $id;
26
27
    /**
28
     * @var \Doctrine\Common\Collections\Collection|UserGroup[]
29
     * @ORM\ManyToMany(targetEntity="UserGroup", mappedBy="users")
30
     */
31
    protected $groups;
32
33
    /**
34
     * @var \Doctrine\Common\Collections\Collection|Session[]
35
     * @ORM\OneToMany(targetEntity="Session", mappedBy="user")
36
     */
37
    protected $sessions;
38
39
    /**
40
     * @var Address
41
     * @ORM\OneToOne(targetEntity="Address")
42
     */
43
    protected $address;
44
45
    /**
46
     *
47
     */
48
    public function __construct()
49
    {
50
        $this->groups   = new ArrayCollection();
51
        $this->sessions = new ArrayCollection();
52
    }
53
}
54