Test Setup Failed
Push — master ( 725d07...3e9883 )
by Alexey
02:15
created

SlackMessage::setRecipient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm
4
 * User: Alexey Samara
5
 */
6
7
namespace WoWApps\SlackBotBundle\DTO;
8
9
class SlackMessage
10
{
11
    /** @var string */
12
    private $text;
13
14
    /** @var int */
15
    private $quoteType;
16
17
    /** @var string */
18
    private $quoteTitle;
19
20
    /** @var string */
21
    private $quoteText;
22
23
    /** @var bool */
24
    private $showQuote;
25
26
    /** @var string */
27
    private $recipient;
28
29
    /** @var string */
30
    private $sender;
31
32
33
    /**
34
     * SlackMessage constructor.
35
     * @param string $text
36
     * @param int $quoteType
37
     * @param string $quoteTitle
38
     * @param string $quoteText
39
     * @param bool $showQuote
40
     * @param string $recipient
41
     * @param string $sender
42
     */
43
    public function __construct(
44
        string $text = '',
45
        int $quoteType = 0,
46
        string $quoteTitle = '',
47
        string $quoteText = '',
48
        bool $showQuote = false,
49
        string $recipient = '',
50
        string $sender = ''
51
    ) {
52
        $this
53
            ->setText($text)
54
            ->setQuoteType($quoteType)
55
            ->setQuoteTitle($quoteTitle)
56
            ->setQuoteText($quoteText)
57
            ->setShowQuote($showQuote)
58
            ->setRecipient($recipient)
59
            ->setSender($sender);
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getText(): string
66
    {
67
        return $this->text;
68
    }
69
70
    /**
71
     * @param string $text
72
     * @return $this
73
     */
74
    public function setText(string $text)
75
    {
76
        $this->text = $text;
77
        return $this;
78
    }
79
80
    /**
81
     * @return int
82
     */
83
    public function getQuoteType(): int
84
    {
85
        return $this->quoteType;
86
    }
87
88
    /**
89
     * @param int $quoteType
90
     * @return $this
91
     */
92
    public function setQuoteType(int $quoteType)
93
    {
94
        $this->quoteType = $quoteType;
95
        return $this;
96
    }
97
98
    /**
99
     * @return string
100
     */
101
    public function getQuoteTitle(): string
102
    {
103
        return $this->quoteTitle;
104
    }
105
106
    /**
107
     * @param string $quoteTitle
108
     * @return $this
109
     */
110
    public function setQuoteTitle(string $quoteTitle)
111
    {
112
        $this->quoteTitle = $quoteTitle;
113
        return $this;
114
    }
115
116
    /**
117
     * @return string
118
     */
119
    public function getQuoteText(): string
120
    {
121
        return $this->quoteText;
122
    }
123
124
    /**
125
     * @param string $quoteText
126
     * @return $this
127
     */
128
    public function setQuoteText(string $quoteText)
129
    {
130
        $this->quoteText = $quoteText;
131
        return $this;
132
    }
133
134
    /**
135
     * @return bool
136
     */
137
    public function isShowQuote(): bool
138
    {
139
        return $this->showQuote;
140
    }
141
142
    /**
143
     * @param bool $showQuote
144
     * @return $this
145
     */
146
    public function setShowQuote(bool $showQuote)
147
    {
148
        $this->showQuote = $showQuote;
149
        return $this;
150
    }
151
152
    /**
153
     * @return string
154
     */
155
    public function getRecipient(): string
156
    {
157
        return $this->recipient;
158
    }
159
160
    /**
161
     * @param string $recipient
162
     * @return $this
163
     */
164
    public function setRecipient(string $recipient)
165
    {
166
        $this->recipient = $recipient;
167
        return $this;
168
    }
169
170
    /**
171
     * @return string
172
     */
173
    public function getSender(): string
174
    {
175
        return $this->sender;
176
    }
177
178
    /**
179
     * @param string $sender
180
     * @return $this
181
     */
182
    public function setSender(string $sender)
183
    {
184
        $this->sender = $sender;
185
        return $this;
186
    }
187
}
188