1 | <?php |
||
12 | class Cycle extends Combinatorics implements \Iterator { |
||
13 | |||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $c = array(); |
||
|
|||
18 | |||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | protected $count = 0; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | protected $pos = 0; |
||
28 | |||
29 | /** |
||
30 | * Cycle constructor. |
||
31 | * |
||
32 | * @param array $dataset |
||
33 | */ |
||
34 | 1 | public function __construct(array $dataset = array()) { |
|
38 | |||
39 | /** |
||
40 | * @return int |
||
41 | */ |
||
42 | public function key() { |
||
45 | |||
46 | /** |
||
47 | * @return array |
||
48 | */ |
||
49 | 1 | public function current() { |
|
52 | |||
53 | /** |
||
54 | * |
||
55 | */ |
||
56 | 1 | public function next() { |
|
59 | |||
60 | /** |
||
61 | * |
||
62 | */ |
||
63 | 1 | public function rewind() { |
|
66 | |||
67 | /** |
||
68 | * @return bool |
||
69 | */ |
||
70 | public function valid() { |
||
73 | |||
74 | /** |
||
75 | * @return int |
||
76 | */ |
||
77 | 1 | public function count() { |
|
80 | |||
81 | } |
||
82 |
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.