1 | <?php |
||
5 | class Dataset implements \Countable { |
||
6 | |||
7 | /** |
||
8 | * @var SubsetItem[] |
||
9 | */ |
||
10 | protected $items; |
||
11 | |||
12 | /** |
||
13 | * @return int |
||
14 | */ |
||
15 | 2 | public function count() { |
|
18 | |||
19 | /** |
||
20 | * @return SubsetItem[] |
||
21 | */ |
||
22 | 6 | public function getItems() { |
|
25 | |||
26 | /** |
||
27 | * @param SubsetItem[] $items |
||
28 | * |
||
29 | * @return \drupol\phpartition\SubsetItem[] |
||
|
|||
30 | */ |
||
31 | 6 | public function setItems(array $items = array()) { |
|
34 | |||
35 | /** |
||
36 | * @param \drupol\phpartition\SubsetItem $item |
||
37 | */ |
||
38 | 6 | public function add(SubsetItem $item) { |
|
41 | |||
42 | /** |
||
43 | * @return int |
||
44 | */ |
||
45 | 2 | public function getSum() { |
|
54 | |||
55 | /** |
||
56 | * @return array |
||
57 | */ |
||
58 | public function getItemsValues() { |
||
67 | |||
68 | /** |
||
69 | * @param SubsetItem[] $items |
||
70 | */ |
||
71 | public function substract(array $items = array()) { |
||
74 | |||
75 | /** |
||
76 | * |
||
77 | */ |
||
78 | 6 | public function clear() { |
|
81 | |||
82 | /** |
||
83 | * @param $key |
||
84 | * |
||
85 | * @return \drupol\phpartition\SubsetItem |
||
86 | */ |
||
87 | public function getItem($key) { |
||
90 | |||
91 | /** |
||
92 | * @param SubsetItem[] $items |
||
93 | */ |
||
94 | 2 | public function deleteItems(array $items = array()) { |
|
99 | |||
100 | /** |
||
101 | * @param \drupol\phpartition\SubsetItem $item |
||
102 | */ |
||
103 | 2 | public function delete(SubsetItem $item) { |
|
110 | |||
111 | /** |
||
112 | * @param string $order |
||
113 | * |
||
114 | * @return $this |
||
115 | */ |
||
116 | 4 | public function sortByValue($order = 'ASC') { |
|
135 | |||
136 | } |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.