1 | <?php |
||
10 | class Combinations implements \Iterator, \Countable { |
||
11 | protected $c = NULL; |
||
1 ignored issue
–
show
|
|||
12 | protected $dataset = NULL; |
||
1 ignored issue
–
show
|
|||
13 | protected $count = 0; |
||
14 | protected $length = 0; |
||
15 | protected $pos = 0; |
||
16 | |||
17 | /** |
||
18 | * Combinations constructor. |
||
19 | * |
||
20 | * @param array $dataset |
||
21 | * @param null $length |
||
22 | */ |
||
23 | 6 | public function __construct(array $dataset = array(), $length = NULL) { |
|
29 | |||
30 | /** |
||
31 | * @return int |
||
32 | */ |
||
33 | public function key() { |
||
36 | |||
37 | /** |
||
38 | * @return array |
||
39 | */ |
||
40 | 6 | public function current() { |
|
46 | |||
47 | /** |
||
48 | * |
||
49 | */ |
||
50 | 6 | public function next() { |
|
56 | |||
57 | /** |
||
58 | * |
||
59 | */ |
||
60 | 6 | public function rewind() { |
|
64 | |||
65 | /** |
||
66 | * @return bool |
||
67 | */ |
||
68 | 6 | public function valid() { |
|
71 | |||
72 | /** |
||
73 | * @return bool |
||
74 | */ |
||
75 | 6 | protected function _next() { |
|
90 | |||
91 | /** |
||
92 | * @return array |
||
93 | */ |
||
94 | 3 | public function toArray() { |
|
101 | |||
102 | /** |
||
103 | * @return int |
||
104 | */ |
||
105 | 3 | public function count() { |
|
108 | |||
109 | /** |
||
110 | * @return array|null |
||
111 | */ |
||
112 | 3 | public function getDataset() { |
|
115 | |||
116 | /** |
||
117 | * @return int|null |
||
118 | */ |
||
119 | 3 | public function getLength() { |
|
122 | } |
||
123 |
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.