Person   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 50
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getId() 0 4 1
A getName() 0 4 1
A setName() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Facile\DoctrineDDMTest\Assets\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * @ORM\Entity
11
 * @ORM\Table(name="person")
12
 * @ORM\InheritanceType("SINGLE_TABLE")
13
 * @ORM\DiscriminatorColumn(name="type", type="string")
14
 * @ORM\DiscriminatorMap({
15
 *      "person" = "Person"
16
 * })
17
 */
18
class Person
19
{
20
    /**
21
     * @var int
22
     *
23
     * @ORM\Id
24
     * @ORM\Column(type="integer")
25
     * @ORM\GeneratedValue()
26
     */
27
    protected $id;
28
    /**
29
     * @var string
30
     * @ORM\Column(type="string")
31
     */
32
    protected $name;
33
34
    /**
35
     * Person constructor.
36
     *
37
     * @param string $name
38
     */
39
    public function __construct(string $name)
40
    {
41
        $this->name = $name;
42
    }
43
44
    /**
45
     * @return int
46
     */
47
    public function getId(): int
48
    {
49
        return $this->id;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getName(): string
56
    {
57
        return $this->name;
58
    }
59
60
    /**
61
     * @param string $name
62
     */
63
    public function setName(string $name)
64
    {
65
        $this->name = $name;
66
    }
67
}
68