Completed
Pull Request — master (#602)
by Tom
07:01
created

User   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 37
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DoctrineORMModuleTest\Assets\GraphEntity;
6
7
use Doctrine\Common\Collections\ArrayCollection;
8
use Doctrine\Common\Collections\Collection;
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * Part of the test assets used to produce a demo of graphs in the ZDT integration
13
 *
14
 * @link    http://www.doctrine-project.org/
15
 *
16
 * @ORM\Entity()
17
 */
18
class User
19
{
20
    /**
21
     * @ORM\Id()
22
     * @ORM\GeneratedValue(strategy="AUTO")
23
     * @ORM\Column(type="integer")
24
     */
25
    protected int $id;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
26
27
    /**
28
     * @ORM\ManyToMany(targetEntity="UserGroup", mappedBy="users")
29
     *
30
     * @var Collection|UserGroup[]
31
     */
32
    protected Collection $groups;
33
34
    /**
35
     * @ORM\OneToMany(targetEntity="Session", mappedBy="user")
36
     *
37
     * @var Collection|Session[]
38
     */
39
    protected Collection $sessions;
40
41
    /** @ORM\OneToOne(targetEntity="Address") */
42
    protected Address $address;
43
44
    public function __construct()
45
    {
46
        $this->groups   = new ArrayCollection();
47
        $this->sessions = new ArrayCollection();
48
    }
49
}
50