| Conditions | 8 |
| Paths | 9 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | protected function render($value, $indent = 1, $allow_env = true) |
||
| 8 | { |
||
| 9 | switch (gettype($value)) { |
||
| 10 | case 'array': |
||
| 11 | return $this->renderArray($value, $indent, $allow_env); |
||
| 12 | case 'string': |
||
| 13 | return (starts_with($value, 'env(') && $allow_env) |
||
| 14 | ? $value |
||
| 15 | : "'".addslashes($value)."'"; |
||
| 16 | case 'boolean': |
||
| 17 | return $value ? 'true' : 'false'; |
||
| 18 | default: |
||
| 19 | return is_null($value) ? 'null' : $value; |
||
| 20 | } |
||
| 21 | } |
||
| 22 | |||
| 45 |