Contact   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 95
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 10
eloc 16
dl 0
loc 95
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A setManager() 0 3 1
A getPhoto() 0 3 1
A getManager() 0 3 1
A setBirthDate() 0 3 1
A getName() 0 3 1
A setPhoto() 0 3 1
A setRelations() 0 3 1
A getRelations() 0 3 1
A getBirthDate() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers\Fixtures\Integration\Models;
5
6
7
use DateTimeInterface;
8
use Psr\Http\Message\UploadedFileInterface;
9
10
class Contact
11
{
12
    /**
13
     * @var string
14
     */
15
    private $name;
16
    /**
17
     * @var Contact|null
18
     */
19
    private $manager;
20
    /**
21
     * @var Contact[]
22
     */
23
    private $relations = [];
24
    /**
25
     * @var UploadedFileInterface
26
     */
27
    private $photo;
28
    /**
29
     * @var DateTimeInterface
30
     */
31
    private $birthDate;
32
33
    public function __construct(string $name)
34
    {
35
        $this->name = $name;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getName(): string
42
    {
43
        return $this->name;
44
    }
45
46
    public function getManager(): ?Contact
47
    {
48
        return $this->manager;
49
    }
50
51
    /**
52
     * @param Contact|null $manager
53
     */
54
    public function setManager(?Contact $manager): void
55
    {
56
        $this->manager = $manager;
57
    }
58
59
    /**
60
     * @return Contact[]
61
     */
62
    public function getRelations(): array
63
    {
64
        return $this->relations;
65
    }
66
67
    /**
68
     * @param Contact[] $relations
69
     */
70
    public function setRelations(array $relations): void
71
    {
72
        $this->relations = $relations;
73
    }
74
75
    /**
76
     * @return UploadedFileInterface
77
     */
78
    public function getPhoto(): UploadedFileInterface
79
    {
80
        return $this->photo;
81
    }
82
83
    /**
84
     * @param UploadedFileInterface $photo
85
     */
86
    public function setPhoto(UploadedFileInterface $photo): void
87
    {
88
        $this->photo = $photo;
89
    }
90
91
    /**
92
     * @return DateTimeInterface
93
     */
94
    public function getBirthDate(): DateTimeInterface
95
    {
96
        return $this->birthDate;
97
    }
98
99
    /**
100
     * @param DateTimeInterface $birthDate
101
     */
102
    public function setBirthDate(DateTimeInterface $birthDate): void
103
    {
104
        $this->birthDate = $birthDate;
105
    }
106
}
107