| 1 | <?php declare(strict_types=1); |
||
| 14 | class FactoryQueue extends \SplPriorityQueue |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | protected $serial = PHP_INT_MAX; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * PriorityQueue constructor. |
||
| 23 | * @param Factory[] ...$factories |
||
| 24 | */ |
||
| 25 | public function __construct(Factory ...$factories) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param Factory $factory |
||
| 34 | */ |
||
| 35 | public function add(Factory $factory) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param mixed $value |
||
| 42 | * @param mixed $priority |
||
| 43 | */ |
||
| 44 | public function insert($value, $priority) |
||
| 48 | } |
||
| 49 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: