1 | <?php |
||
18 | class PriorityList implements \IteratorAggregate |
||
19 | { |
||
20 | /** |
||
21 | * @var [] |
||
22 | */ |
||
23 | protected $list = []; |
||
24 | |||
25 | /** |
||
26 | * @return PriorityList |
||
|
|||
27 | */ |
||
28 | public function __construct() |
||
32 | |||
33 | /** |
||
34 | * @param $value |
||
35 | * @param int $priority |
||
36 | * @return $this |
||
37 | */ |
||
38 | public function insert($value, $priority = 0) |
||
49 | |||
50 | /** |
||
51 | * @return \Generator |
||
52 | */ |
||
53 | public function getIterator() |
||
61 | } |
||
62 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.