Passed
Pull Request — master (#168)
by Tomáš
03:29
created
src/Phpml/Helper/Optimizer/StochasticGD.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\Helper\Optimizer;
6 6
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      * The cost function to minimize and the gradient of the function are to be
145 145
      * handled by the callback function provided as the third parameter of the method.
146 146
      */
147
-    public function runOptimization(array $samples, array $targets, Closure $gradientCb): ?array
147
+    public function runOptimization(array $samples, array $targets, Closure $gradientCb): ? array
148 148
     {
149 149
         $this->samples = $samples;
150 150
         $this->targets = $targets;
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     {
230 230
         // Check for early stop: No change larger than threshold (default 1e-5)
231 231
         $diff = array_map(
232
-            function ($w1, $w2) {
232
+            function($w1, $w2) {
233 233
                 return abs($w1 - $w2) > $this->threshold ? 1 : 0;
234 234
             },
235 235
             $oldTheta,
Please login to merge, or discard this patch.