| Conditions | 8 |
| Paths | 2 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | private function printArray($array, $column = -4) |
||
| 25 | { |
||
| 26 | $output = ''; |
||
| 27 | |||
| 28 | if (is_array($array)) { |
||
| 29 | $column += 4; |
||
| 30 | foreach ($array as $key=>$val) { |
||
| 31 | if (is_array($val)) { |
||
| 32 | $output .= str_repeat(' ', $column)."$key:\n".$this->printArray($val, $column); |
||
| 33 | } |
||
| 34 | if (is_string($val) || is_int($val)) { |
||
| 35 | $output .= str_repeat(' ', $column)."$key: $val\n"; |
||
| 36 | } |
||
| 37 | if (is_bool($val)) { |
||
| 38 | $output .= str_repeat(' ', $column)."$key: ".($val ? 'true' : 'false')."\n"; |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | return $output; |
||
| 44 | } |
||
| 45 | } |
||
| 46 |