Test Failed
Push — master ( bd1e8a...fed951 )
by Alexey
12:42 queued 12s
created

AttachmentActionConfirm::getButtonDismissText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the WoW-Apps/Symfony-Slack-Bot bundle for Symfony.
5
 * https://github.com/wow-apps/symfony-slack-bot
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 * https://github.com/wow-apps/symfony-slack-bot/blob/master/LICENSE
10
 *
11
 * For technical documentation.
12
 * https://wow-apps.github.io/symfony-slack-bot/docs/
13
 *
14
 * Author Alexey Samara <[email protected]>
15
 *
16
 * Copyright 2016 WoW-Apps.
17
 */
18
19
namespace WowApps\SlackBundle\DTO;
20
21
/**
22
 * Class AttachmentActionConfirm.
23
 *
24
 * @author Alexey Samara <[email protected]>
25
 */
26
class AttachmentActionConfirm
27
{
28
    const BUTTON_DEFAULT_TEXT_OK = 'OK';
29
    const BUTTON_DEFAULT_TEXT_DISMISS = 'Cancel';
30
31
    /** @var bool */
32
    private $active;
33
34
    /** @var string */
35
    private $title;
36
37
    /** @var string */
38
    private $text;
39
40
    /** @var string */
41
    private $buttonOkText;
42
43
    /** @var string */
44
    private $buttonDismissText;
45
46
    /**
47
     * AttachmentActionConfirm constructor.
48
     *
49
     * @param bool   $active
50
     * @param string $title
51
     * @param string $text
52
     * @param string $buttonOkText
53
     * @param string $buttonDismissText
54
     */
55
    public function __construct(
56
        bool   $active = false,
57
        string $title = '',
58
        string $text = '',
59
        string $buttonOkText = self::BUTTON_DEFAULT_TEXT_OK,
60
        string $buttonDismissText = self::BUTTON_DEFAULT_TEXT_DISMISS
61
    ) {
62
        $this->active = $active;
63
        $this->title = $title;
64
        $this->text = $text;
65
        $this->buttonOkText = $buttonOkText;
66
        $this->buttonDismissText = $buttonDismissText;
67
    }
68
69
    /**
70
     * @return bool
71
     */
72
    public function isActive(): bool
73
    {
74
        return $this->active;
75
    }
76
77
    /**
78
     * @param bool $active
79
     *
80
     * @return AttachmentActionConfirm
81
     */
82
    public function setActive(bool $active): AttachmentActionConfirm
83
    {
84
        $this->active = $active;
85
86
        return $this;
87
    }
88
89
    /**
90
     * @return string
91
     */
92
    public function getTitle(): string
93
    {
94
        return $this->title;
95
    }
96
97
    /**
98
     * @param string $title
99
     *
100
     * @return AttachmentActionConfirm
101
     */
102
    public function setTitle(string $title): AttachmentActionConfirm
103
    {
104
        $this->title = $title;
105
106
        return $this;
107
    }
108
109
    /**
110
     * @return string
111
     */
112
    public function getText(): string
113
    {
114
        return $this->text;
115
    }
116
117
    /**
118
     * @param string $text
119
     *
120
     * @return AttachmentActionConfirm
121
     */
122
    public function setText(string $text): AttachmentActionConfirm
123
    {
124
        $this->text = $text;
125
126
        return $this;
127
    }
128
129
    /**
130
     * @return string
131
     */
132
    public function getButtonOkText(): string
133
    {
134
        return $this->buttonOkText;
135
    }
136
137
    /**
138
     * @param string $buttonOkText
139
     *
140
     * @return AttachmentActionConfirm
141
     */
142
    public function setButtonOkText(string $buttonOkText): AttachmentActionConfirm
143
    {
144
        $this->buttonOkText = $buttonOkText;
145
146
        return $this;
147
    }
148
149
    /**
150
     * @return string
151
     */
152
    public function getButtonDismissText(): string
153
    {
154
        return $this->buttonDismissText;
155
    }
156
157
    /**
158
     * @param string $buttonDismissText
159
     *
160
     * @return AttachmentActionConfirm
161
     */
162
    public function setButtonDismissText(string $buttonDismissText): AttachmentActionConfirm
163
    {
164
        $this->buttonDismissText = $buttonDismissText;
165
166
        return $this;
167
    }
168
}
169