We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eec16a2 commit 1ebaa41Copy full SHA for 1ebaa41
src/Drivers/PhpDriver.php
@@ -130,7 +130,7 @@ public function toFile(array $values): string
130
}
131
132
/**
133
- * @param array<array-key, scalar|scalar[]> $items
+ * @param array<array-key, null|scalar|array<array-key, null|scalar>> $items
134
*/
135
public function recursiveToFile(
136
array $items,
@@ -157,6 +157,12 @@ public function recursiveToFile(
157
158
if (is_string($value)) {
159
$value = "'".str_replace('\"', '"', addslashes($value))."'";
160
+ } elseif (is_null($value)) {
161
+ $value = 'null';
162
+ } elseif (is_bool($value)) {
163
+ $value = $value ? 'true' : 'false';
164
+ } else {
165
+ $value = (string) $value;
166
167
168
if (is_string($key)) {
0 commit comments