Conditions | 9 |
Paths | 7 |
Total Lines | 15 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | private function renderValue($value): string |
||
41 | { |
||
42 | switch (true) { |
||
43 | case $value === null: |
||
44 | return 'null'; |
||
45 | case is_bool($value): |
||
46 | return $value ? 'true' : 'false'; |
||
47 | case is_array($value): |
||
48 | return $this->renderArray($value); |
||
49 | case !$this->wrapValue || is_int($value) || $value instanceof ArrayItemRenderer: |
||
50 | return (string)$value; |
||
51 | case is_string($value): |
||
52 | return "'" . addslashes($value) . "'"; |
||
53 | default: |
||
54 | return "unserialize('" . addslashes(serialize($value)) . "')"; |
||
55 | } |
||
74 |