1 | <?php |
||
10 | class Cycle extends Combinatorics implements \Iterator { |
||
11 | |||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | protected $c = array(); |
||
|
|||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | protected $count = 0; |
||
21 | |||
22 | /** |
||
23 | * @var int |
||
24 | */ |
||
25 | protected $pos = 0; |
||
26 | |||
27 | /** |
||
28 | * Cycle constructor. |
||
29 | * |
||
30 | * @param array $dataset |
||
31 | */ |
||
32 | 1 | public function __construct(array $dataset = array()) { |
|
36 | |||
37 | /** |
||
38 | * @return int |
||
39 | */ |
||
40 | public function key() { |
||
43 | |||
44 | /** |
||
45 | * @return array |
||
46 | */ |
||
47 | public function current() { |
||
50 | |||
51 | /** |
||
52 | * |
||
53 | */ |
||
54 | public function next() { |
||
57 | |||
58 | /** |
||
59 | * |
||
60 | */ |
||
61 | 1 | public function rewind() { |
|
64 | |||
65 | /** |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function valid() { |
||
71 | |||
72 | /** |
||
73 | * @return int |
||
74 | */ |
||
75 | 1 | public function count() { |
|
78 | |||
79 | } |
||
80 |
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.