1 | <?php |
||
5 | class Subset implements \Countable { |
||
6 | |||
7 | /** |
||
8 | * @var BasePartitionAlgorithm |
||
9 | */ |
||
10 | protected $algo; |
||
11 | |||
12 | /** |
||
13 | * @var SubsetItem[] |
||
14 | */ |
||
15 | protected $items; |
||
16 | |||
17 | /** |
||
18 | * @return int |
||
19 | */ |
||
20 | 2 | public function count() { |
|
23 | |||
24 | /** |
||
25 | * @param \drupol\phpartition\SubsetItem $item |
||
26 | */ |
||
27 | 6 | public function addItem(SubsetItem $item) { |
|
30 | |||
31 | /** |
||
32 | * @param SubsetItem[] $items |
||
33 | */ |
||
34 | 2 | public function addItems(array $items = array()) { |
|
39 | |||
40 | /** |
||
41 | * @return SubsetItem[] |
||
42 | */ |
||
43 | 6 | public function getItems() { |
|
46 | |||
47 | /** |
||
48 | * @param array $items |
||
49 | */ |
||
50 | 6 | public function setItems(array $items = array()) { |
|
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | public function getItemsValues() { |
||
66 | |||
67 | /** |
||
68 | * @return array |
||
69 | */ |
||
70 | 6 | public function getRawItems() { |
|
79 | |||
80 | /** |
||
81 | * @return int |
||
82 | */ |
||
83 | 2 | public function getWeight() { |
|
92 | |||
93 | /** |
||
94 | * @param \drupol\phpartition\BasePartitionAlgorithm $algo |
||
95 | */ |
||
96 | 6 | public function setAlgo(BasePartitionAlgorithm $algo) { |
|
99 | |||
100 | /** |
||
101 | * @return BasePartitionAlgorithm |
||
102 | */ |
||
103 | 6 | public function getAlgo() { |
|
106 | |||
107 | /** |
||
108 | * @param SubsetItem[] $items |
||
109 | */ |
||
110 | public function substract(array $items = array()) { |
||
113 | |||
114 | /** |
||
115 | * |
||
116 | */ |
||
117 | 6 | public function clear() { |
|
120 | |||
121 | /** |
||
122 | * @param $key |
||
123 | * |
||
124 | * @return \drupol\phpartition\SubsetItem |
||
125 | */ |
||
126 | public function getItem($key) { |
||
129 | |||
130 | /** |
||
131 | * @param SubsetItem[] $items |
||
132 | */ |
||
133 | 2 | public function deleteItems(array $items = array()) { |
|
138 | |||
139 | /** |
||
140 | * @param \drupol\phpartition\SubsetItem $item |
||
141 | */ |
||
142 | 2 | public function delete(SubsetItem $item) { |
|
149 | |||
150 | /** |
||
151 | * @param string $order |
||
152 | * |
||
153 | * @return $this |
||
154 | */ |
||
155 | 4 | public function sortByValue($order = 'ASC') { |
|
174 | |||
175 | } |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.