Passed
Branch master (ed38c8)
by Roma
03:45
created
Category
src/AngularSweep.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     private function calculateDistances()
73 73
     {
74
-        for ($i = 0; $i < $this->numbersCollection->total()-1; $i++) {
74
+        for ($i = 0; $i < $this->numbersCollection->total() - 1; $i++) {
75 75
             for ($j = $i + 1; $j < $this->numbersCollection->total(); $j++) {
76 76
                 $this->distances[$i][$j] = $this->distances[$j][$i] =
77 77
                     $this->numbersCollection->get($i)->subtract($this->numbersCollection->get($j))->abs();
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
         $angles = [];
109 109
 
110 110
         for ($j = 0; $j < $this->numbersCollection->total(); $j++) {
111
-            if ($i !== $j && $this->distances[$i][$j] <= 2*$this->radius) {
112
-                $B = acos($this->distances[$i][$j]/(2*$this->radius));
111
+            if ($i !== $j && $this->distances[$i][$j] <= 2 * $this->radius) {
112
+                $B = acos($this->distances[$i][$j] / (2 * $this->radius));
113 113
                 $A = $this->numbersCollection->get($j)->subtract($this->numbersCollection->get($i))->arg();
114 114
                 $alpha = $A - $B;
115 115
                 $beta = $A + $B;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             }
119 119
         }
120 120
 
121
-        usort($angles, function ($a, $b) {
121
+        usort($angles, function($a, $b) {
122 122
             if ($a === $b) {
123 123
                 return 0;
124 124
             }
Please login to merge, or discard this patch.