| Conditions | 5 |
| Paths | 6 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | public function write(Buffer $buffer) |
||
| 41 | { |
||
| 42 | $lines = []; |
||
| 43 | foreach ($this->data as $var => $value) { |
||
| 44 | if (is_array($value)) { |
||
| 45 | $_tmpString = ''; |
||
| 46 | foreach ($value as $key => $val) { |
||
| 47 | $_tmpString .= sprintf("%s('%s'\n)", $key, $val); |
||
| 48 | } |
||
| 49 | $value = $_tmpString; |
||
| 50 | } |
||
| 51 | $lines[] = sprintf('%s:%s', $var, $value); |
||
| 52 | } |
||
| 53 | |||
| 54 | if ($lines) { |
||
| 55 | $data = implode('/', $lines); |
||
| 56 | $this->dataCount = mb_strlen($data); |
||
| 57 | parent::write($buffer); |
||
| 58 | $buffer->writeString($data); |
||
| 59 | } |
||
| 62 |