Skip to content

Commit

Permalink
non primitive fallback bug
Browse files Browse the repository at this point in the history
  • Loading branch information
idbentley committed Jul 3, 2024
1 parent acb0b47 commit 8869cbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Handler/UnionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private function reorderTypes(array $type): array
if ($type['params']) {

Check failure on line 93 in src/Handler/UnionHandler.php

View workflow job for this annotation

GitHub Actions / Coding Standards (7.4)

Expected 1 line after "if", found 0.
uasort($type['params'], function($a, $b) {

Check failure on line 94 in src/Handler/UnionHandler.php

View workflow job for this annotation

GitHub Actions / Coding Standards (7.4)

Expected 1 space after FUNCTION keyword; 0 found

Check failure on line 94 in src/Handler/UnionHandler.php

View workflow job for this annotation

GitHub Actions / Coding Standards (7.4)

Closure not using "$this" should be declared static.
$order = ['null' => 0, 'true' => 1, 'false' => 2, 'bool' => 3, 'int' => 4, 'float' => 5, 'string' => 6];
return $order[$a['name']] || 7 <=> $order[$b['name']] || 7;
return (array_key_exists($a['name'], $order) ? $order[$a['name']] : 7) <=> (array_key_exists($b['name'], $order) ? $order[$b['name']] : 7);

Check failure on line 96 in src/Handler/UnionHandler.php

View workflow job for this annotation

GitHub Actions / Coding Standards (7.4)

Expected 1 line before "return", found 0.
});
}
return $type;
Expand Down

0 comments on commit 8869cbe

Please sign in to comment.