Pipe::setType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace SlayerBirden\DataFlowServer\Pipeline\Entities;
5
6
use Doctrine\ORM\Mapping as ORM;
7
use SlayerBirden\DataFlowServer\Domain\Entities\User;
8
9
/**
10
 * @ORM\Entity
11
 * @ORM\Table(name="pipes")
12
 **/
13
class Pipe
14
{
15
    /**
16
     * @ORM\Id
17
     * @ORM\Column(type="integer")
18
     * @ORM\GeneratedValue
19
     * @var integer
20
     **/
21
    private $id;
22
    /**
23
     * @ORM\Column(type="string")
24
     * @var string
25
     */
26
    private $name;
27
    /**
28
     * @ORM\ManyToOne(targetEntity="\SlayerBirden\DataFlowServer\Domain\Entities\User")
29
     * @ORM\JoinColumn(nullable=false)
30
     * @var User
31
     */
32
    private $owner;
33
    /**
34
     * @ORM\ManyToOne(targetEnti="\SlayerBirden\DataFlowServer\Pipeline\Entities\Type")
35
     * @ORM\JoinColumn(nullable=false)
36
     * @var Type
37
     */
38
    private $type;
39
    /**
40
     * @ORM\Column(type="datetime")
41
     * @var \DateTime
42
     */
43
    private $createdAt;
44
    /**
45
     * @ORM\Column(type="datetime")
46
     * @var \DateTime
47
     */
48
    private $updatedAt;
49
50
    /**
51
     * @return int
52
     */
53
    public function getId(): int
54
    {
55
        return $this->id;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getName(): string
62
    {
63
        return $this->name;
64
    }
65
66
    /**
67
     * @param string $name
68
     */
69
    public function setName(string $name): void
70
    {
71
        $this->name = $name;
72
    }
73
74
    /**
75
     * @return User
76
     */
77
    public function getOwner(): User
78
    {
79
        return $this->owner;
80
    }
81
82
    /**
83
     * @param User $owner
84
     */
85
    public function setOwner(User $owner): void
86
    {
87
        $this->owner = $owner;
88
    }
89
90
    /**
91
     * @return Type
92
     */
93
    public function getType(): Type
94
    {
95
        return $this->type;
96
    }
97
98
    /**
99
     * @param Type $type
100
     */
101
    public function setType(Type $type): void
102
    {
103
        $this->type = $type;
104
    }
105
106
    /**
107
     * @return \DateTime
108
     */
109
    public function getCreatedAt(): \DateTime
110
    {
111
        return $this->createdAt;
112
    }
113
114
    /**
115
     * @param \DateTime $createdAt
116
     */
117
    public function setCreatedAt(\DateTime $createdAt): void
118
    {
119
        $this->createdAt = $createdAt;
120
    }
121
122
    /**
123
     * @return \DateTime
124
     */
125
    public function getUpdatedAt(): \DateTime
126
    {
127
        return $this->updatedAt;
128
    }
129
130
    /**
131
     * @param \DateTime $updatedAt
132
     */
133
    public function setUpdatedAt(\DateTime $updatedAt): void
134
    {
135
        $this->updatedAt = $updatedAt;
136
    }
137
}
138