Skip to content

Commit

Permalink
Use <=> operator in URI
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Mar 25, 2024
1 parent dc42cb9 commit 4f220ea
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/main/php/util/URI.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,6 @@ public function hashCode() { return md5($this->asString(true)); }
* @return int
*/
public function compareTo($value) {
if ($value instanceof self) {
$a= $this->asString(true);
$b= $value->asString(true);
return $a === $b ? 0 : ($a < $b ? -1 : 1);
} else {
return 1;
}
return $value instanceof self ? $this->asString(true) <=> $value->asString(true) : 1;
}
}

0 comments on commit 4f220ea

Please sign in to comment.