Text   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 85
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 11
eloc 17
c 1
b 0
f 0
dl 0
loc 85
rs 10

11 Methods

Rating   Name   Duplication   Size   Complexity  
A setString() 0 3 1
A isReplaceable() 0 3 1
A setReplaceable() 0 3 1
A getString() 0 3 1
A getPrefix() 0 3 1
A getPostfix() 0 3 1
A setPrefix() 0 3 1
A __construct() 0 3 1
A setPostfix() 0 3 1
A getReplaceChars() 0 3 1
A setReplaceChars() 0 3 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
}