Test Setup Failed
Push — master ( 80a7cc...26b8e4 )
by Alexey
02:49
created

Comment::getPostId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Skobkin\Bundle\PointToolsBundle\DTO\Api;
4
5
class Comment implements ValidableInterface
6
{
7
    /**
8
     * @var string|null
9
     */
10
    private $postId;
11
12
    /**
13
     * @var int|null
14
     */
15
    private $number;
16
17
    /**
18
     * @var int|null
19
     */
20
    private $toCommentId;
21
22
    /**
23
     * @var string|null
24
     */
25
    private $created;
26
27
    /**
28
     * @var string|null
29
     */
30
    private $text;
31
32
    /**
33
     * @var User|null
34
     */
35
    private $author;
36
37
    /**
38
     * @var bool|null
39
     */
40
    private $isRec;
41
42
43
    public function getPostId(): ?string
44
    {
45
        return $this->postId;
46
    }
47
48
    public function setPostId(?string $postId): void
49
    {
50
        $this->postId = $postId;
51
    }
52
53
    public function getNumber(): ?int
54
    {
55
        return $this->number;
56
    }
57
58
    public function setNumber(?int $number): void
59
    {
60
        $this->number = $number;
61
    }
62
63
    public function getToCommentId(): ?int
64
    {
65
        return $this->toCommentId;
66
    }
67
68
    public function setToCommentId(?int $toCommentId): void
69
    {
70
        $this->toCommentId = $toCommentId;
71
    }
72
73
    public function getCreated(): string
74
    {
75
        return $this->created;
76
    }
77
78
    public function setCreated(?string $created): void
79
    {
80
        $this->created = $created;
81
    }
82
83
    public function getText(): ?string
84
    {
85
        return $this->text;
86
    }
87
88
    public function setText(?string $text): void
89
    {
90
        $this->text = $text;
91
    }
92
93
    public function getAuthor(): ?User
94
    {
95
        return $this->author;
96
    }
97
98
    public function setAuthor(?User $author): void
99
    {
100
        $this->author = $author;
101
    }
102
103
    public function isIsRec(): ?bool
104
    {
105
        return $this->isRec;
106
    }
107
108
    public function getIsRec(): ?bool
109
    {
110
        return $this->isRec;
111
    }
112
113
    public function setIsRec(?bool $isRec): void
114
    {
115
        $this->isRec = $isRec;
116
    }
117
118
    public function isValid(): bool
119
    {
120
        if (null !== $this->postId && null !== $this->number && null !== $this->author && null !== $this->text) {
121
            return true;
122
        }
123
124
        return false;
125
    }
126
}