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

PlaceholderTrait::getPlaceholder()   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;
3
4
use Maknz\Slack\BlockElement\Text;
5
6
trait PlaceholderTrait
7
{
8
    /**
9
     * Select placeholder.
10
     *
11
     * @var \Maknz\Slack\BlockElement\Text
12
     */
13
    protected $placeholder;
14
15
    /**
16
     * Get the placeholder.
17
     *
18
     * @return \Maknz\Slack\BlockElement\Text
19
     */
20 41
    public function getPlaceholder()
21
    {
22 41
        return $this->placeholder;
23
    }
24
25
    /**
26
     * Set the placeholder.
27
     *
28
     * @param mixed $placeholder
29
     *
30
     * @return $this
31
     *
32
     * @throws \InvalidArgumentException
33
     */
34 47
    public function setPlaceholder($placeholder)
35
    {
36 47
        $this->placeholder = Text::create($placeholder, Text::TYPE_PLAIN);
37
38 47
        return $this;
39
    }
40
}
41