Skip to content

Commit

Permalink
Use max function
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Jul 22, 2024
1 parent 27bf016 commit b6ebf0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function getSurround() : int
*/
public function setSurround(int $surround) : static
{
$this->surround = $surround < 0 ? 0 : $surround;
$this->surround = \max($surround, 0);
return $this;
}

Expand Down

0 comments on commit b6ebf0e

Please sign in to comment.