Text::setString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace detox\source;
4
5
class Text
6
{
7
    private $text;
8
    private $replaceChars  = '-----';
9
    private $prefix        = ' _';
10
    private $postfix       = '_ ';
11
    private $isReplaceable = false;
12
13
    public function __construct(string $text)
14
    {
15
        $this->text = $text;
16
    }
17
18
    public function setString(string $text) : void
19
    {
20
        $this->text = $text;
21
    }
22
23
    public function getString() : string
24
    {
25
        return $this->text;
26
    }
27
28
    /**
29
     * @param mixed $replaceChars
30
     */
31
    public function setReplaceChars(string $replaceChars) : void
32
    {
33
        $this->replaceChars = $replaceChars;
34
    }
35
36
    /**
37
     * @return mixed
38
     */
39
    public function getReplaceChars() : string
40
    {
41
        return $this->replaceChars;
42
    }
43
44
    /**
45
     * @param mixed $prefix
46
     */
47
    public function setPrefix($prefix) : void
48
    {
49
        $this->prefix = $prefix;
50
    }
51
52
    /**
53
     * @return mixed
54
     */
55
    public function getPostfix()
56
    {
57
        return $this->postfix;
58
    }
59
60
    /**
61
     * @param mixed $postfix
62
     */
63
    public function setPostfix($postfix) : void
64
    {
65
        $this->postfix = $postfix;
66
    }
67
68
    /**
69
     * @return mixed
70
     */
71
    public function getPrefix()
72
    {
73
        return $this->prefix;
74
    }
75
76
    /**
77
     * @return mixed
78
     */
79
    public function isReplaceable() : bool
80
    {
81
        return $this->isReplaceable;
82
    }
83
84
    /**
85
     * @param mixed $isReplaceable
86
     */
87
    public function setReplaceable(bool $isReplaceable) : void
88
    {
89
        $this->isReplaceable = $isReplaceable;
90
    }
91
}