We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce7b28f commit 2bf8629Copy full SHA for 2bf8629
1 file changed
Spanner/src/ValueMapper.php
@@ -851,11 +851,14 @@ private function typeObject(
851
array $nestedDefinition = [],
852
string|null $nestedDefinitionType = null
853
): array {
854
- return array_filter([
+ $result = [
855
'code' => $type,
856
- $nestedDefinitionType => $nestedDefinition,
857
'typeAnnotation' => $typeAnnotation
858
- ]);
+ ];
+ if (null !== $nestedDefinitionType) {
859
+ $result[$nestedDefinitionType] = $nestedDefinition;
860
+ }
861
+ return array_filter($result);
862
}
863
864
/**
0 commit comments