Skip to content

Commit

Permalink
simplify condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
idbentley committed Jul 9, 2024
1 parent 480e92f commit ffa7b5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Metadata/Driver/TypedPropertiesDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private function reorderTypes(array $type): array
uasort($type['params'], static function ($a, $b) {
$order = ['null' => 0, 'true' => 1, 'false' => 2, 'bool' => 3, 'int' => 4, 'float' => 5, 'string' => 6];

return (array_key_exists($a['name'], $order) ? $order[$a['name']] : 7) <=> (array_key_exists($b['name'], $order) ? $order[$b['name']] : 7);
return ($order[$a['name']] ?? 7) <=> ($order[$b['name']] ?? 7);
});
}

Expand Down

0 comments on commit ffa7b5e

Please sign in to comment.