@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function current() { |
49 | 49 | $r = array(); |
50 | - for($i = 0; $i < $this->length; $i++) { |
|
50 | + for ($i = 0; $i < $this->length; $i++) { |
|
51 | 51 | $r[] = $this->dataset[$this->c[$i]]; |
52 | 52 | } |
53 | 53 | return $r; |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | while ($i >= 0 && $this->c[$i] == $this->datasetCount - $this->length + $i) { |
89 | 89 | $i--; |
90 | 90 | } |
91 | - if($i < 0) { |
|
91 | + if ($i < 0) { |
|
92 | 92 | return FALSE; |
93 | 93 | } |
94 | 94 | $this->c[$i]++; |
95 | - while($i++ < $this->length - 1) { |
|
95 | + while ($i++ < $this->length - 1) { |
|
96 | 96 | $this->c[$i] = $this->c[$i - 1] + 1; |
97 | 97 | } |
98 | 98 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function toArray() { |
106 | 106 | $data = []; |
107 | - for($this->rewind(); $this->valid(); $this->next()) { |
|
107 | + for ($this->rewind(); $this->valid(); $this->next()) { |
|
108 | 108 | $data[] = $this->current(); |
109 | 109 | } |
110 | 110 | return $data; |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * @return int |
115 | 115 | */ |
116 | 116 | public function count() { |
117 | - return $this->fact(count($this->getDataset()))/$this->fact($this->getLength()); |
|
117 | + return $this->fact(count($this->getDataset())) / $this->fact($this->getLength()); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | } |
@@ -59,8 +59,7 @@ |
||
59 | 59 | public function next() { |
60 | 60 | if ($this->_next()) { |
61 | 61 | $this->pos++; |
62 | - } |
|
63 | - else { |
|
62 | + } else { |
|
64 | 63 | $this->pos = -1; |
65 | 64 | } |
66 | 65 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | * @return int |
76 | 76 | */ |
77 | 77 | protected function fact($n, $total = 1) { |
78 | - return ($n < 2) ? $total : $this->fact($n-1, $total * $n); |
|
78 | + return ($n < 2) ? $total : $this->fact($n - 1, $total * $n); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | } |
82 | 82 | \ No newline at end of file |