Completed
Push — master ( b5dbe1...4c076d )
by Pol
02:14
created
src/Combinations.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,8 +39,9 @@  discard block
 block discarded – undo
39 39
    */
40 40
   public function current() {
41 41
     $r = array();
42
-    for($i = 0; $i < $this->length; $i++)
43
-      $r[] = $this->dataset[$this->c[$i]];
42
+    for($i = 0; $i < $this->length; $i++) {
43
+          $r[] = $this->dataset[$this->c[$i]];
44
+    }
44 45
     return $r;
45 46
   }
46 47
 
@@ -48,10 +49,11 @@  discard block
 block discarded – undo
48 49
    *
49 50
    */
50 51
   public function next() {
51
-    if ($this->_next())
52
-      $this->pos++;
53
-    else
54
-      $this->pos = -1;
52
+    if ($this->_next()) {
53
+          $this->pos++;
54
+    } else {
55
+          $this->pos = -1;
56
+    }
55 57
   }
56 58
 
57 59
   /**
Please login to merge, or discard this patch.
src/Permutations.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.