Event::getBody()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Loevgaard\DandomainAltapayBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Knp\DoctrineBehaviors\Model as ORMBehaviors;
7
use Symfony\Component\Validator\Constraints as Assert;
8
9
/**
10
 * @ORM\Table(name="dandomain_altapay_events")
11
 * @ORM\Entity()
12
 */
13
class Event
14
{
15
    use ORMBehaviors\Timestampable\Timestampable;
16
17
    /**
18
     * @var int
19
     *
20
     * @ORM\Id
21
     * @ORM\Column(name="id", type="integer")
22
     * @ORM\GeneratedValue(strategy="AUTO")
23
     */
24
    protected $id;
25
26
    /**
27
     * @var string
28
     *
29
     * @Assert\NotBlank()
30
     * @Assert\Length(max="191")
31
     *
32
     * @ORM\Column(type="string", length=191)
33
     */
34
    protected $name;
35
36
    /**
37
     * @var string
38
     *
39
     * @Assert\NotBlank()
40
     *
41
     * @ORM\Column(type="text")
42
     */
43
    protected $body;
44
45
    public function __construct(string $name, string $body)
46
    {
47
        $this->setName($name);
48
        $this->setBody($body);
49
    }
50
51
    /**
52
     * @return int
53
     */
54
    public function getId(): ?int
55
    {
56
        return $this->id;
57
    }
58
59
    /**
60
     * @param int $id
61
     *
62
     * @return Event
63
     */
64
    public function setId(int $id): self
65
    {
66
        $this->id = $id;
67
68
        return $this;
69
    }
70
71
    /**
72
     * @return string
73
     */
74
    public function getName(): string
75
    {
76
        return $this->name;
77
    }
78
79
    /**
80
     * @param string $name
81
     *
82
     * @return Event
83
     */
84
    public function setName(string $name): self
85
    {
86
        $this->name = $name;
87
88
        return $this;
89
    }
90
91
    /**
92
     * @return string
93
     */
94
    public function getBody(): string
95
    {
96
        return $this->body;
97
    }
98
99
    /**
100
     * @param string $body
101
     *
102
     * @return Event
103
     */
104
    public function setBody(string $body): self
105
    {
106
        $this->body = $body;
107
108
        return $this;
109
    }
110
}
111