| Conditions | 4 |
| Paths | 6 |
| Total Lines | 23 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function suffix($result = true) |
||
| 33 | { |
||
| 34 | $totalLen = strlen($this->outPad.$this->outMessage); |
||
| 35 | $output = null; |
||
| 36 | |||
| 37 | //overwrite current line |
||
| 38 | $output .= "\033[" . $totalLen . 'D'; |
||
| 39 | $output .= str_repeat(' ', $this->padding); |
||
| 40 | $output .= $this->outMessage; |
||
| 41 | |||
| 42 | $padLen = 74 - $totalLen; |
||
| 43 | if (0 < $padLen) { |
||
| 44 | $output .= str_repeat(' ', $padLen); |
||
| 45 | } |
||
| 46 | if ($this->showResult) { |
||
| 47 | $output .= '['; |
||
| 48 | $output .= $result ? "\e[32mOK" : "\e[31mKO"; |
||
| 49 | $output .= "\e[0m" . ']'; |
||
| 50 | } |
||
| 51 | |||
| 52 | $output .= "\r"; |
||
| 53 | |||
| 54 | return $output; |
||
| 55 | } |
||
| 62 |