@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public function current() { |
| 41 | 41 | $r = array(); |
| 42 | - for($i = 0; $i < $this->length; $i++) |
|
| 42 | + for ($i = 0; $i < $this->length; $i++) |
|
| 43 | 43 | $r[] = $this->dataset[$this->c[$i]]; |
| 44 | 44 | return $r; |
| 45 | 45 | } |
@@ -77,11 +77,11 @@ discard block |
||
| 77 | 77 | while ($i >= 0 && $this->c[$i] == $this->count - $this->length + $i) { |
| 78 | 78 | $i--; |
| 79 | 79 | } |
| 80 | - if($i < 0) { |
|
| 80 | + if ($i < 0) { |
|
| 81 | 81 | return FALSE; |
| 82 | 82 | } |
| 83 | 83 | $this->c[$i]++; |
| 84 | - while($i++ < $this->length - 1) { |
|
| 84 | + while ($i++ < $this->length - 1) { |
|
| 85 | 85 | $this->c[$i] = $this->c[$i - 1] + 1; |
| 86 | 86 | } |
| 87 | 87 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | public function toArray() { |
| 95 | 95 | $data = []; |
| 96 | - for($this->rewind(); $this->valid(); $this->next()) { |
|
| 96 | + for ($this->rewind(); $this->valid(); $this->next()) { |
|
| 97 | 97 | $data[] = $this->current(); |
| 98 | 98 | } |
| 99 | 99 | return $data; |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | foreach (new Combinations($items, $this->getLength()) as $dataset) { |
| 92 | 92 | if (empty($dataset)) { |
| 93 | 93 | $return = array($perms); |
| 94 | - } else { |
|
| 94 | + } else { |
|
| 95 | 95 | $return = array(); |
| 96 | 96 | for ($i = count($dataset) - 1; $i >= 0; --$i) { |
| 97 | 97 | $newitems = $dataset; |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | public function toArray() { |
| 114 | 114 | $results = array(); |
| 115 | 115 | |
| 116 | - foreach($this->generator() as $value) { |
|
| 116 | + foreach ($this->generator() as $value) { |
|
| 117 | 117 | $results[] = $value; |
| 118 | 118 | } |
| 119 | 119 | |