Skip to content

Commit

Permalink
PuffinReporter: fixed sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiri Travnicek committed Aug 6, 2016
1 parent 1e84d92 commit 35cd92b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions module/PuffinReporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ public function _afterSuite()
}

// sort results by deviation
uasort($results, function ($item1, $item2) {
if ($item1['deviation'] === $item2['deviation']) {
uasort($results, function ($left, $right) {
if ($left['deviation'] === $right['deviation']) {
return 0;
}
return $item1['deviation'] < $item2['deviation'] ? -1 : 1;
return $left['deviation'] < $right['deviation'] ? 1 : -1;
});

// convert images to base64 string
Expand Down

0 comments on commit 35cd92b

Please sign in to comment.