| Total Complexity | 8 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 4 | class CodeWriter |
||
| 5 | { |
||
| 6 | private $lines = ""; |
||
| 7 | private $indentation = 0; |
||
| 8 | |||
| 9 | public function add($line = '') |
||
| 10 | { |
||
| 11 | $this->lines .= str_repeat(' ', $this->indentation) . "$line\n"; |
||
| 12 | } |
||
| 13 | |||
| 14 | public function addNoLn($line = '') |
||
| 15 | { |
||
| 16 | $this->lines .= str_repeat(' ', $this->indentation) . "$line"; |
||
| 17 | } |
||
| 18 | |||
| 19 | public function addNoIndent($line = '') |
||
| 22 | } |
||
| 23 | |||
| 24 | public function ln() |
||
| 25 | { |
||
| 26 | $this->lines .= "\n"; |
||
| 27 | } |
||
| 28 | |||
| 29 | |||
| 30 | public function addIndent() |
||
| 31 | { |
||
| 32 | $this->indentation += 4; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function decreaseIndent() |
||
| 36 | { |
||
| 37 | $this->indentation -= 4; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function __toString() |
||
| 51 | } |
||
| 52 | |||
| 53 | public function getTimestamp() |
||
| 54 | { |
||
| 59 |