diff --git a/Spanner/src/Operation.php b/Spanner/src/Operation.php index 4740e82985d8..16c1f0aaf12f 100644 --- a/Spanner/src/Operation.php +++ b/Spanner/src/Operation.php @@ -1005,8 +1005,12 @@ private function formatPartitionQueryOptions(array $args): array $parameters = $args['parameters'] ?? []; $types = $args['types'] ?? []; - $paramsAndParamTypes = $this->mapper->formatParamsForExecuteSql($parameters, $types); - return $this->formatSqlParams($paramsAndParamTypes); + /** @var array{params: array, paramTypes: array} $paramsAndParamTypes */ + $paramsAndParamTypes = $this->formatSqlParams( + $this->mapper->formatParamsForExecuteSql($parameters, $types) + ); + + return $paramsAndParamTypes; } /** diff --git a/Spanner/src/ValueMapper.php b/Spanner/src/ValueMapper.php index 636d84b26cde..93344374bbec 100644 --- a/Spanner/src/ValueMapper.php +++ b/Spanner/src/ValueMapper.php @@ -137,7 +137,7 @@ public function __construct(bool $returnInt64AsObject) * * @param array $parameters The key/value parameters. * @param array $types The types of values. - * @return array An associative array containing params and paramTypes. + * @return array{params: array, paramTypes: array} */ public function formatParamsForExecuteSql(array $parameters, array $types = []): array { @@ -836,8 +836,7 @@ private function objectParam(mixed $value): array * @param int $typeAnnotation The type annotation code * @param array $nestedDefinition [optional] A nested definition, to define * the structure of an array or struct type. - * @param string $nestedDefinitionType [optional] Either `arrayElementType` - * or `structType`. + * @param 'arrayElementType'|'structType'|null $nestedDefinitionType * @return array{ * code?: int, * arrayElementType?: array,