| 1 | <?php |
||
| 14 | class ItemList extends \SplMaxHeap |
||
| 15 | { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Compare elements in order to place them correctly in the heap while sifting up. |
||
| 19 | * |
||
| 20 | * @see \SplMaxHeap::compare() |
||
| 21 | * |
||
| 22 | * @param mixed $itemA |
||
| 23 | * @param mixed $itemB |
||
| 24 | * |
||
| 25 | * @return int |
||
|
|
|||
| 26 | */ |
||
| 27 | 38 | public function compare($itemA, $itemB) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Get copy of this list as a standard PHP array |
||
| 44 | * @return array |
||
| 45 | */ |
||
| 46 | 28 | public function asArray() |
|
| 54 | } |
||
| 55 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.