Passed
Push — main ( cb3172...6ba222 )
by Shubham
01:56
created
src/reductions/rref.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,10 @@
 block discarded – undo
26 26
         $lead = 0;
27 27
         $ar = $m->copyMatrix();
28 28
         for ($r = 0; $r < $ar->row; ++$r) {
29
-            if ($lead >= $ar->col)
30
-                break; {
29
+            if ($lead >= $ar->col) {
30
+                            break;
31
+            }
32
+            {
31 33
                 $i = $r;
32 34
                 while ($ar->data[$i * $ar->col + $lead] == 0) {
33 35
                     $i++;
Please login to merge, or discard this patch.
src/core/lapack.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
         self::init();
54 54
         if($mat->dtype == \Np\matrix::FLOAT){
55 55
             return self::$ffi_lapack->LAPACKE_sgetri($matLayout, $mat->row, $mat->data, $mat->row, $ipiv->data);
56
-        }
57
-        else {
56
+        } else {
58 57
             return self::$ffi_lapack->LAPACKE_dgetri($matLayout, $mat->row, $mat->data, $mat->row, $ipiv->data);
59 58
         }
60 59
     }
@@ -138,8 +137,7 @@  discard block
 block discarded – undo
138 137
         self::init();
139 138
         if($m->dtype == \Np\matrix::FLOAT){
140 139
             return self::$ffi_lapack->LAPACKE_slange($matLayout, $norm, $m->row, $m->col, $m->data, $m->col);
141
-        }
142
-        else{
140
+        } else{
143 141
             return self::$ffi_lapack->LAPACKE_dlange($matLayout, $norm, $m->row, $m->col, $m->data, $m->col);
144 142
         }   
145 143
     }
Please login to merge, or discard this patch.
src/convolve.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
                 $r->data[$i] = $sigma;
30 30
             }
31 31
             return $r;
32
-        }
33
-        else {
32
+        } else {
34 33
             throw new dtypeException('Err::given vectors has diffrent data type!');
35 34
         }
36 35
     }
@@ -69,8 +68,7 @@  discard block
 block discarded – undo
69 68
                 }
70 69
             }
71 70
             return $rc;
72
-        }
73
-        else {
71
+        } else {
74 72
             throw new \Exception('Err::given matrixes has different data type!');
75 73
         }
76 74
     }
Please login to merge, or discard this patch.