Comment::setContent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 2
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
/*
4
 * This file is part of the CwdPowerDNS Client
5
 *
6
 * (c) 2018 cwd.at GmbH <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Cwd\PowerDNSClient\Model\Zone;
15
16
use Symfony\Component\Serializer\Annotation\Groups;
17
use Symfony\Component\Validator\Constraints as Assert;
18
19
class Comment
20
{
21
    /**
22
     * @var string
23
     * @Assert\NotBlank(groups={"CREATE", "UPDATE"})
24
     * @Groups({"REPLACE", "CREATE"})
25
     */
26
    protected $content;
27
28
    /**
29
     * @var string
30
     * @Groups({"REPLACE", "CREATE"})
31
     * @Assert\NotBlank(groups={"CREATE", "UPDATE"})
32
     */
33
    protected $account;
34
35
    /** @var int */
36
    protected $modifiedAt;
37
38
    /**
39
     * @return string
40
     */
41
    public function getContent(): string
42
    {
43
        return $this->content;
44
    }
45
46
    /**
47
     * @param string $content
48
     *
49
     * @return Comment
50
     */
51
    public function setContent(string $content): Comment
52
    {
53
        $this->content = $content;
54
55
        return $this;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getAccount(): ?string
62
    {
63
        return $this->account;
64
    }
65
66
    /**
67
     * @param string $account
68
     *
69
     * @return Comment
70
     */
71
    public function setAccount(?string $account): Comment
72
    {
73
        $this->account = $account;
74
75
        return $this;
76
    }
77
78
    /**
79
     * @return int
80
     */
81
    public function getModifiedAt(): ?int
82
    {
83
        return $this->modifiedAt;
84
    }
85
86
    /**
87
     * @param int $modifiedAt
88
     *
89
     * @return Comment
90
     */
91
    public function setModifiedAt(int $modifiedAt): Comment
92
    {
93
        $this->modifiedAt = $modifiedAt;
94
95
        return $this;
96
    }
97
}
98