1 | <?php |
||
10 | class PartitionContainer extends \SplHeap { |
||
11 | |||
12 | /** |
||
13 | * @var BasePartitionAlgorithm |
||
14 | */ |
||
15 | protected $algo; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | protected $size; |
||
21 | |||
22 | /** |
||
23 | * Override compare method. |
||
24 | * |
||
25 | * @param Partition $a |
||
26 | * @param Partition $b |
||
27 | * |
||
28 | * @return int |
||
29 | */ |
||
30 | 10 | public function compare($a, $b) { |
|
39 | |||
40 | /** |
||
41 | * @param $size |
||
42 | */ |
||
43 | 10 | public function setSize($size) { |
|
52 | |||
53 | /** |
||
54 | * @return int |
||
55 | */ |
||
56 | 10 | public function getSize() { |
|
59 | |||
60 | /** |
||
61 | * @param PartitionItem[] $items |
||
62 | */ |
||
63 | 4 | public function addItemsToPartition(array $items = array()) { |
|
68 | |||
69 | /** |
||
70 | * @param \drupol\phpartition\PartitionItem $item |
||
71 | */ |
||
72 | 4 | public function addItemToPartition(PartitionItem $item) { |
|
78 | |||
79 | /** |
||
80 | * @return Partition[] |
||
81 | */ |
||
82 | 10 | public function getPartitions() { |
|
92 | |||
93 | /** |
||
94 | * @return array |
||
95 | */ |
||
96 | 10 | public function getPartitionsItemsArray() { |
|
105 | |||
106 | /** |
||
107 | * @param \drupol\phpartition\BasePartitionAlgorithm $algo |
||
108 | */ |
||
109 | 10 | public function setAlgo(BasePartitionAlgorithm $algo) { |
|
112 | |||
113 | /** |
||
114 | * @return BasePartitionAlgorithm |
||
115 | */ |
||
116 | 10 | public function getAlgo() { |
|
119 | |||
120 | } |
||
121 |
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.