Passed
Branch master (b25019)
by Michał
04:17
created
Category
src/Data/Xml.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      */
181 181
     public function checkId($elementId)
182 182
     {
183
-        return (bool)$this->getElementById($elementId);
183
+        return (bool) $this->getElementById($elementId);
184 184
     }
185 185
 
186 186
     /**
@@ -236,6 +236,6 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function __toString()
238 238
     {
239
-        return (string)$this->saveXmlFile();
239
+        return (string) $this->saveXmlFile();
240 240
     }
241 241
 }
Please login to merge, or discard this patch.
src/Calculation/Math.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             return false;
25 25
         }
26 26
 
27
-        return 100 - (($into / $from) *100);
27
+        return 100 - (($into / $from) * 100);
28 28
     }
29 29
 
30 30
     /**
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             return false;
41 41
         }
42 42
 
43
-        return ($part / $all) *100;
43
+        return ($part / $all) * 100;
44 44
     }
45 45
 
46 46
     /**
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             return false;
57 57
         }
58 58
 
59
-        return ($part / 100) *$all;
59
+        return ($part / 100) * $all;
60 60
     }
61 61
 
62 62
     /**
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
 
91 91
         sort($data);
92 92
         $valuesCount = count($data);
93
-        $key = ($valuesCount -1 ) / 2;
93
+        $key = ($valuesCount - 1) / 2;
94 94
         $median = $data[$key];
95 95
 
96 96
         if (!($valuesCount % 2)) {
97
-            $median = ($median + $data[$key +1]) / 2;
97
+            $median = ($median + $data[$key + 1]) / 2;
98 98
         }
99 99
 
100 100
         return $median;
Please login to merge, or discard this patch.
src/Check/Validator.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
         'date' =>               '#^[\\d]{4}-[\\d]{2}-[\\d]{2}$#',
39 39
         'month' =>              '#^[\\d]{4}-[\\d]{2}$#',
40 40
         'datetime' =>           '#^[\\d]{4}-[\\d]{2}-[\\d]{2} [\\d]{2}:[\\d]{2}$#',
41
-        'jdate' =>              '#^[\\d]{2}/[\\d]{2}/[\\d]{4}$#',                        //time from jquery datepicker
42
-        'jdatetime' =>          '#^[\\d]{2}/[\\d]{2}/[\\d]{4} [\\d]{2}:[\\d]{2}$#',      //time from jquery datepicker
41
+        'jdate' =>              '#^[\\d]{2}/[\\d]{2}/[\\d]{4}$#', //time from jquery datepicker
42
+        'jdatetime' =>          '#^[\\d]{2}/[\\d]{2}/[\\d]{4} [\\d]{2}:[\\d]{2}$#', //time from jquery datepicker
43 43
         'time' =>               '#^[\\d]{2}:[\\d]{2}(:[\\d]{2})?$#',
44 44
         'hex_color' =>          '/^#[\\da-f]{6}$/i',
45 45
         'hex' =>                '/^#[\\da-f]+$/i',
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                     $sum += $nip[$key] * $val;
170 170
                 }
171 171
 
172
-                return (string)($sum % 11) === $nip[9];
172
+                return (string) ($sum % 11) === $nip[9];
173 173
             }
174 174
         }
175 175
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         $int = 10 - $intSum % 10;
252 252
         $intControlNr = ($int === 10) ? 0 : $int;
253 253
 
254
-        return (string)$intControlNr === $value[10];
254
+        return (string) $intControlNr === $value[10];
255 255
     }
256 256
 
257 257
     /**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
         $int = $intSum % 11;
280 280
         $intControlNr = ($int === 10) ? 0 : $int;
281 281
 
282
-        return (string)$intControlNr === $value[8];
282
+        return (string) $intControlNr === $value[8];
283 283
     }
284 284
 
285 285
     /**
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
         ];
306 306
 
307 307
         foreach ($aNumWeight as $key => $num) {
308
-            $iNumSum += $num * $iNRB[29 -$key];
308
+            $iNumSum += $num * $iNRB[29 - $key];
309 309
         }
310 310
 
311 311
         return $iNumSum % 97 === 1;
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     {
322 322
         $values = '';
323 323
         $mod = 0;
324
-        $remove = [' ', '-', '_', '.', ',','/', '|'];
324
+        $remove = [' ', '-', '_', '.', ',', '/', '|'];
325 325
         $cleared = str_replace($remove, '', $value);
326 326
         $temp = strtoupper($cleared);
327 327
         $chars = [
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         $sum = strlen($values);
352 352
         for ($i = 0; $i < $sum; $i += 6) {
353 353
             $separated = $mod . substr($values, $i, 6);
354
-            $mod = (int)($separated) % 97;
354
+            $mod = (int) ($separated) % 97;
355 355
         }
356 356
 
357 357
         return $mod === 1;
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
             return false;
425 425
         }
426 426
 
427
-        $check = (abs($value) -abs($default)) % $step;
427
+        $check = (abs($value) - abs($default)) % $step;
428 428
 
429 429
         if ($check) {
430 430
             return false;
Please login to merge, or discard this patch.