Passed
Pull Request — master (#130)
by Marcin
02:55
created
src/Phpml/Helper/Optimizer/ConjugateGradient.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 Phpml\Helper\Optimizer;
6 6
 
Please login to merge, or discard this patch.
src/Phpml/Helper/Optimizer/Optimizer.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 Phpml\Helper\Optimizer;
6 6
 
Please login to merge, or discard this patch.
src/Phpml/NeuralNetwork/ActivationFunction/PReLU.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 Phpml\NeuralNetwork\ActivationFunction;
6 6
 
Please login to merge, or discard this patch.
src/Phpml/Classification/MLPClassifier.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 Phpml\Classification;
6 6
 
Please login to merge, or discard this patch.
src/Phpml/FeatureExtraction/StopWords/French.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 Phpml\FeatureExtraction\StopWords;
6 6
 
Please login to merge, or discard this patch.
src/Phpml/Helper/Optimizer/StochasticGD.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Phpml\Helper\Optimizer;
6 6
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     {
241 241
         // Check for early stop: No change larger than threshold (default 1e-5)
242 242
         $diff = array_map(
243
-            function ($w1, $w2) {
243
+            function($w1, $w2) {
244 244
                 return abs($w1 - $w2) > $this->threshold ? 1 : 0;
245 245
             },
246 246
             $oldTheta,
Please login to merge, or discard this patch.
src/Phpml/Helper/Optimizer/GD.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 Phpml\Helper\Optimizer;
6 6
 
Please login to merge, or discard this patch.
src/Phpml/Clustering/FuzzyCMeans.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Phpml\Clustering;
6 6
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                 $total += $val;
102 102
             }
103 103
 
104
-            $this->membership[] = array_map(function ($val) use ($total) {
104
+            $this->membership[] = array_map(function($val) use ($total) {
105 105
                 return $val / $total;
106 106
             }, $row);
107 107
         }
Please login to merge, or discard this patch.
src/Phpml/Classification/NaiveBayes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Phpml\Classification;
6 6
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                 $this->dataType[$label][$i] = self::NOMINAL;
102 102
                 $this->discreteProb[$label][$i] = array_count_values($values);
103 103
                 $db = &$this->discreteProb[$label][$i];
104
-                $db = array_map(function ($el) use ($numValues) {
104
+                $db = array_map(function($el) use ($numValues) {
105 105
                     return $el / $numValues;
106 106
                 }, $db);
107 107
             } else {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
             return $this->discreteProb[$label][$feature][$value];
134 134
         }
135
-        $std = $this->std[$label][$feature] ;
135
+        $std = $this->std[$label][$feature];
136 136
         $mean = $this->mean[$label][$feature];
137 137
         // Calculate the probability density by use of normal/Gaussian distribution
138 138
         // Ref: https://en.wikipedia.org/wiki/Normal_distribution
Please login to merge, or discard this patch.