1 | <?php |
||
11 | class Combinations extends Combinatorics implements IteratorInterface |
||
12 | { |
||
13 | /** |
||
14 | * The values. |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $c = []; |
||
|
|||
19 | |||
20 | /** |
||
21 | * The key. |
||
22 | * |
||
23 | * @var int |
||
24 | */ |
||
25 | protected $key = 0; |
||
26 | |||
27 | /** |
||
28 | * Combinations constructor. |
||
29 | * |
||
30 | * @param array $dataset |
||
31 | * The dataset |
||
32 | * @param int|null $length |
||
33 | * The length |
||
34 | */ |
||
35 | 10 | public function __construct(array $dataset = [], $length = null) |
|
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | 4 | public function current() |
|
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 4 | public function next() |
|
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | 10 | public function rewind() |
|
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | 4 | public function valid() |
|
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | 10 | public function count() |
|
92 | |||
93 | /** |
||
94 | * Custom next() callback. |
||
95 | * |
||
96 | * @return bool |
||
97 | * Return true or false |
||
98 | */ |
||
99 | 4 | protected function nextHelper() |
|
117 | } |
||
118 |
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.