Passed
Push — main ( cb3172...6ba222 )
by Shubham
01:56
created
benchmarks/vector/signalProcessing/convolveBench.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@
 block discarded – undo
21 21
     protected $b;
22 22
 
23 23
     public function setUp() : void {
24
-        $this->a = matrix::uniform(500,500);
24
+        $this->a = matrix::uniform(500, 500);
25 25
 
26
-        $this->b = matrix::uniform(50,50);
26
+        $this->b = matrix::uniform(50, 50);
27 27
     }
28 28
 
29 29
     /**
Please login to merge, or discard this patch.
benchmarks/matrix/arithmetic/sumMatrixBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     /**
14 14
      * @var \Np\matrix
15 15
      */
16
-    protected $a,$b;
16
+    protected $a, $b;
17 17
 
18 18
     public function setUp() : void {
19 19
         $this->a = matrix::uniform(500, 500);
Please login to merge, or discard this patch.
benchmarks/matrix/arithmetic/matrixVectorMultiplyBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Np\benchmarks\matrix\arithmetic;
4 4
 
5
-use Np\{matrix,vector};
5
+use Np\{matrix, vector};
6 6
 
7 7
 /**
8 8
  * @Groups({"Arithmetic"})
Please login to merge, or discard this patch.
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/reductions/ref.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
 
20 20
 class ref { 
21 21
     
22
-     /**
23
-      * 
24
-      * @param \Np\matrix $m
25
-      * @return matrix|null
26
-      */
22
+        /**
23
+         * 
24
+         * @param \Np\matrix $m
25
+         * @return matrix|null
26
+         */
27 27
     public static function factory(\Np\matrix $m): matrix|null {
28 28
         $ipiv = vector::factory(min($m->row, $m->col), vector::INT);
29 29
         $ar = $m->copyMatrix();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
       * @param \Np\matrix $m
25 25
       * @return matrix|null
26 26
       */
27
-    public static function factory(\Np\matrix $m): matrix|null {
27
+    public static function factory(\Np\matrix $m): matrix | null {
28 28
         $ipiv = vector::factory(min($m->row, $m->col), vector::INT);
29 29
         $ar = $m->copyMatrix();
30 30
         $lp = lapack::getrf($ar, $ipiv);
Please login to merge, or discard this patch.
src/decompositions/svd.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare (strict_types=1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Np\decompositions;
6 6
 
Please login to merge, or discard this patch.
src/core/lapack.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public static function getri(\Np\matrix $mat, \Np\vector $ipiv, int $matLayout = self::ROW_MAJOR) {
53 53
         self::init();
54
-        if($mat->dtype == \Np\matrix::FLOAT){
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 56
         }
57 57
         else {
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public static function lange(string $norm, \Np\matrix $m, int $matLayout = self::ROW_MAJOR) {
138 138
         self::init();
139
-        if($m->dtype == \Np\matrix::FLOAT){
139
+        if ($m->dtype == \Np\matrix::FLOAT) {
140 140
             return self::$ffi_lapack->LAPACKE_slange($matLayout, $norm, $m->row, $m->col, $m->data, $m->col);
141 141
         }
142
-        else{
142
+        else {
143 143
             return self::$ffi_lapack->LAPACKE_dlange($matLayout, $norm, $m->row, $m->col, $m->data, $m->col);
144 144
         }   
145 145
     }
Please login to merge, or discard this 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/decompositions/lu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare (strict_types=1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Np\decompositions;
6 6
 
Please login to merge, or discard this patch.
src/decompositions/eigen.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare (strict_types=1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Np\decompositions;
6 6
 
Please login to merge, or discard this patch.