Skip to content

Commit

Permalink
Fixing code QA (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 3, 2024
1 parent 648dcca commit 3b89da6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/tools/JsonAssert.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private static function recursiveSort(mixed &$array): void

} else {
// Sort by values for indexed arrays
usort($array, function ($a, $b): int {
usort($array, static function ($a, $b): int {
if (is_array($a) && is_array($b)) {
return strcmp(Utils\Json::encode($a), Utils\Json::encode($b));
}
Expand All @@ -148,12 +148,12 @@ private static function recursiveSort(mixed &$array): void

/**
* @param array<mixed> $array
*
* @return bool
*/
private static function isAssoc(array $array): bool
{
if ($array === []) return false;
if ($array === []) {
return false;
}

return array_keys($array) !== range(0, count($array) - 1);
}
Expand Down

0 comments on commit 3b89da6

Please sign in to comment.