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

RespondableSelect   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 31
ccs 5
cts 5
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isResponseUrlEnabled() 0 3 1
A setResponseUrlEnabled() 0 5 1
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