Total Complexity | 9 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
4 | final class ProgressLine |
||
5 | { |
||
6 | protected $padding; |
||
7 | |||
8 | protected $outPad; |
||
9 | protected $outMessage; |
||
10 | |||
11 | protected $showResult; |
||
12 | |||
13 | public function __construct() |
||
14 | { |
||
15 | $this->showResult = false; |
||
16 | $this->padding = 0; |
||
17 | } |
||
18 | |||
19 | public function setShowResult($showResult) |
||
20 | { |
||
21 | $this->showResult = (bool) $showResult; |
||
22 | } |
||
23 | |||
24 | public function prefix($message = '') |
||
25 | { |
||
26 | $this->outMessage = $message; |
||
27 | |||
28 | $this->outPad = (0 < $this->padding) ? str_repeat(' ', (int) $this->padding) : null; |
||
29 | return $this->outPad.$this->outMessage; |
||
30 | } |
||
31 | |||
32 | public function suffix($result = true) |
||
55 | } |
||
56 | |||
57 | public function finish() |
||
58 | { |
||
62 |