Passed
Push — master ( eec14a...4028c5 )
by Alexander
02:26
created

RespondableSelect::isResponseUrlEnabled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
namespace Maknz\Slack\BlockElement;
3
4
abstract class RespondableSelect extends AbstractDynamicSelect
5
{
6
    /**
7
     * Whether to include a response URL in submission payload.
8
     *
9
     * @var bool
10
     */
11
    protected $response_url_enabled = false;
12
13
    /**
14
     * Get whether to include a response URL in submission payload.
15
     *
16
     * @return bool
17
     */
18 3
    public function isResponseUrlEnabled()
19
    {
20 3
        return $this->response_url_enabled;
21
    }
22
23
    /**
24
     * Set whether to include a response URL in submission payload.
25
     *
26
     * @param bool $enabled
27
     *
28
     * @return $this
29
     */
30 2
    public function setResponseUrlEnabled($enabled = true)
31
    {
32 2
        $this->response_url_enabled = (bool)$enabled;
33
34 2
        return $this;
35
    }
36
}
37