Passed
Push — main ( 051221...b63ebb )
by Shubham
02:26
created
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/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/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.
src/exceptions/dtypeException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
  *
9 9
  * @author ghost
10 10
  */
11
-class dtypeException extends invalidArgumentException{
11
+class dtypeException extends invalidArgumentException {
12 12
     //put your code here
13 13
 }
Please login to merge, or discard this patch.
examples/vector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Np\vector;
6 6
 vector::time();
7 7
 vector::getMemory();
8
-$v = vector::ar(range(random_int(1,2), random_int(99999,9999999))); 
8
+$v = vector::ar(range(random_int(1, 2), random_int(99999, 9999999))); 
9 9
 
10 10
 echo $v->sum() . PHP_EOL;
11 11
 vector::getMemory();
Please login to merge, or discard this patch.
src/core/blas.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -398,7 +398,7 @@
 block discarded – undo
398 398
      * @param \Np\vector|\Np\matrix $v
399 399
      * @return \FFI\CData
400 400
      */
401
-    public static function scale(float $alpha, \Np\vector|\Np\matrix $v) {
401
+    public static function scale(float $alpha, \Np\vector | \Np\matrix $v) {
402 402
         self::init();
403 403
         if ($v->dtype == \Np\vector::DOUBLE) {
404 404
             return self::$ffi_blas->cblas_dscal($v->ndim, $alpha, $v->data, 1);
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.