Skip to content

Commit

Permalink
fix: types check
Browse files Browse the repository at this point in the history
  • Loading branch information
loks0n committed Feb 2, 2024
1 parent ef5547a commit 5cd2a6a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/SDK/Language/Deno.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']) {
Expand Down
4 changes: 3 additions & 1 deletion src/SDK/Language/JS.php
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/SDK/Language/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']) {
Expand Down
2 changes: 1 addition & 1 deletion src/SDK/Language/Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']) {
Expand Down

0 comments on commit 5cd2a6a

Please sign in to comment.