Skip to content

Commit

Permalink
[~]: "The method convert uses an else expression. Else is never neces…
Browse files Browse the repository at this point in the history
…sary and you can simplify the code to work without else."

-> fixed isse #13
  • Loading branch information
Lars Moelleken committed Oct 5, 2015
1 parent 75f7fff commit efb94f8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Specificity.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ public function compareTo(Specificity $specificity)
{
if ($this->a !== $specificity->a) {
return $this->a - $specificity->a;
} elseif ($this->b !== $specificity->b) {
}

if ($this->b !== $specificity->b) {
return $this->b - $specificity->b;
} else {
return $this->c - $specificity->c;
}

return $this->c - $specificity->c;
}
}

0 comments on commit efb94f8

Please sign in to comment.