diff --git a/src/SDK/Language/Deno.php b/src/SDK/Language/Deno.php index 2a140e203..6a75ac88f 100644 --- a/src/SDK/Language/Deno.php +++ b/src/SDK/Language/Deno.php @@ -140,7 +140,7 @@ public function getTypeName(array $parameter, array $spec = []): string if (!empty($parameter['enumValues'])) { return \ucfirst($parameter['name']); } - if ((!empty($parameter['name']) && $parameter['name']) === 'queries') { + if (!empty($parameter['name']) && $parameter['name'] === 'queries') { return 'Query[]'; } return match ($parameter['type']) { diff --git a/src/SDK/Language/JS.php b/src/SDK/Language/JS.php index fab659e29..280ff626d 100644 --- a/src/SDK/Language/JS.php +++ b/src/SDK/Language/JS.php @@ -131,7 +131,9 @@ public function getTypeName(array $parameter, array $spec = []): string if (!empty($parameter['enumValues'])) { return \ucfirst($parameter['name']); } - + if (!empty($parameter['name']) && $parameter['name'] === 'queries') { + return 'Query[]'; + } switch ($parameter['type']) { case self::TYPE_INTEGER: case self::TYPE_NUMBER: diff --git a/src/SDK/Language/Node.php b/src/SDK/Language/Node.php index f58fb4732..ff84c32da 100644 --- a/src/SDK/Language/Node.php +++ b/src/SDK/Language/Node.php @@ -25,7 +25,7 @@ public function getTypeName(array $parameter, array $spec = []): string if (!empty($parameter['enumValues'])) { return \ucfirst($parameter['name']); } - if ((!empty($parameter['name']) && $parameter['name']) === 'queries') { + if (!empty($parameter['name']) && $parameter['name'] === 'queries') { return 'Query[]'; } return match ($parameter['type']) { diff --git a/src/SDK/Language/Web.php b/src/SDK/Language/Web.php index 27a7e8317..732e26862 100644 --- a/src/SDK/Language/Web.php +++ b/src/SDK/Language/Web.php @@ -185,7 +185,7 @@ public function getTypeName(array $parameter, array $method = []): string if (!empty($parameter['enumValues'])) { return \ucfirst($parameter['name']); } - if ((!empty($parameter['name']) && $parameter['name']) === 'queries') { + if (!empty($parameter['name']) && $parameter['name'] === 'queries') { return 'Query[]'; } switch ($parameter['type']) {