Passed
Branch master (fc2336)
by Yasunori
03:40
created
src/Math/Correlation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,12 +133,12 @@  discard block
 block discarded – undo
133 133
         $concordant = [];
134 134
         $discordant = [];
135 135
 
136
-        for ($i = 0; $i < $df->getIndex(); $i ++) {
136
+        for ($i = 0; $i < $df->getIndex(); $i++) {
137 137
 
138 138
             $concordant_count = 0;
139 139
             $discordant_count = 0;
140 140
 
141
-            for ($j = $i+1; $j < $df->getIndex(); $j ++) {
141
+            for ($j = $i + 1; $j < $df->getIndex(); $j++) {
142 142
 
143 143
                 if ($df->{$xColumn}->get($i) < $df->{$xColumn}->get($j)) {
144 144
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $scon = array_sum($concordant);
162 162
         $sdis = array_sum($discordant);
163 163
 
164
-        $t = ($scon - $sdis) / ($df->getIndex() * ($df->getIndex() - 1)  / 2);
164
+        $t = ($scon - $sdis) / ($df->getIndex() * ($df->getIndex() - 1) / 2);
165 165
 
166 166
         return round($t, 4);
167 167
     }
Please login to merge, or discard this patch.
src/Data/DataFrame.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         $arr = array_map(null, ...$arr);
39 39
 
40
-        foreach($columns as $index => $column) {
40
+        foreach ($columns as $index => $column) {
41 41
             $arr[$column] = $arr[$index];
42 42
             unset($arr[$index]);
43 43
         }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
         $numeric = [];
87 87
 
88
-        foreach($columns as $col) {
88
+        foreach ($columns as $col) {
89 89
             if ($this->{$col}->dataType() == 'Numeric') {
90 90
                 array_push($numeric, $col);
91 91
             }
Please login to merge, or discard this patch.
src/Data/Series.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function max($floatPoint = 2) : float
113 113
     {
114
-       // Initialize max value with 1st index of $Sample.
114
+        // Initialize max value with 1st index of $Sample.
115 115
         $max = $this->Sample[0];
116 116
 
117 117
         for ($i = 1; $i < $this->SampleCount; $i++) {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      */
174 174
     public function median($floatPoint = 2) : float
175 175
     {
176
-       return $this->quartile(2, $floatPoint);
176
+        return $this->quartile(2, $floatPoint);
177 177
     }
178 178
 
179 179
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
 
192 192
         $total_s = 0;
193 193
 
194
-        foreach($this->Sample as $s) {
194
+        foreach ($this->Sample as $s) {
195 195
             if (!is_null($s)) {
196 196
                 $total_s += pow(($s - $mean), 2);
197 197
             }
Please login to merge, or discard this patch.