Skip to content

Commit

Permalink
Add ReturnTypeWillChange for PHP 8.1
Browse files Browse the repository at this point in the history
split: 9dcb857bef090f3bc4d60e9fb64dba4b4461cbb2
  • Loading branch information
kylekatarnls committed Nov 11, 2021
1 parent 2bae0ce commit 25c0842
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Event/ListenerQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

namespace Phug\Event;

use ReturnTypeWillChange;
use SplPriorityQueue;

class ListenerQueue extends SplPriorityQueue
{
#[ReturnTypeWillChange]
public function compare($priority, $priorityToCompare)
{
if ($priority === $priorityToCompare) {
Expand All @@ -15,6 +17,7 @@ public function compare($priority, $priorityToCompare)
return $priority > $priorityToCompare ? -1 : 1;
}

#[ReturnTypeWillChange]
public function insert($value, $priority)
{
if (!is_callable($value)) {
Expand Down

0 comments on commit 25c0842

Please sign in to comment.