Completed
Pull Request — master (#42)
by Pol
13s
created
examples/Location.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
         $result = $this->getRandomOrgAPI()->getData($provider);
32 32
 
33 33
         $this->coordinates = [
34
-            'x' => rad2deg($result[0] * 2 * M_PI - M_PI),
35
-            'y' => rad2deg(M_PI / 2 - acos($result[1] * 2 - 1)),
36
-            'z' => $result[2] * 1000,
34
+            'x' => rad2deg($result[0]*2*M_PI - M_PI),
35
+            'y' => rad2deg(M_PI/2 - acos($result[1]*2 - 1)),
36
+            'z' => $result[2]*1000,
37 37
         ];
38 38
 
39 39
         return $this;
Please login to merge, or discard this patch.
examples/Pi.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function run($throws = 1000)
35 35
     {
36 36
         $provider = (new Provider())->withResource('generateDecimalFractions')
37
-            ->withParameters(['n' => $throws * 2, 'decimalPlaces' => 6]);
37
+            ->withParameters(['n' => $throws*2, 'decimalPlaces' => 6]);
38 38
 
39 39
         $numbers = $this->getRandomOrgAPI()->getData($provider);
40 40
 
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
             $x = $numbers[$i];
45 45
             $y = $numbers[$i + 1];
46 46
 
47
-            if (1 >= sqrt($x * $x + $y * $y)) {
47
+            if (1 >= sqrt($x*$x + $y*$y)) {
48 48
                 ++$inside;
49 49
             }
50 50
         }
51 51
 
52
-        $this->estimation = 4 * $inside / $throws;
52
+        $this->estimation = 4*$inside/$throws;
53 53
 
54 54
         return $this;
55 55
     }
Please login to merge, or discard this patch.