ReversePriorityQueue: add ReturnTypeWillChange attribute

it's doubtful any plugin dev is extending this, but nonetheless, we can't change it in a patch.
This commit is contained in:
Dylan K. Taylor 2022-07-27 03:51:06 +01:00
parent 5d9f783037
commit d669a6f0c7
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -38,6 +38,7 @@ class ReversePriorityQueue extends \SplPriorityQueue{
*
* @return int
*/
#[\ReturnTypeWillChange]
public function compare($priority1, $priority2){
//TODO: this will crash if non-numeric priorities are used
return (int) -($priority1 - $priority2);