Passed
Push — master ( 06020c...274f20 )
by Dāvis
03:41
created
Script/Utils/Helper.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             return false;
59 59
         }
60 60
         // @formatter:off
61
-        $months = [31,28,31,30,31,30,31,31,30,31,30,31];
61
+        $months = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
62 62
         // @formatter:on
63 63
         if ($year % 4 === 0) {
64 64
             $months[1] = 29;
@@ -72,15 +72,15 @@  discard block
 block discarded – undo
72 72
         $personCode = str_replace('-', '', $personCode);
73 73
         // @formatter:off
74 74
         $sum =
75
-            (substr($personCode, 0, 1) * 1)  +
76
-            (substr($personCode, 1, 1) * 6)  +
77
-            (substr($personCode, 2, 1) * 3)  +
78
-            (substr($personCode, 3, 1) * 7)  +
79
-            (substr($personCode, 4, 1) * 9)  +
75
+            (substr($personCode, 0, 1) * 1) +
76
+            (substr($personCode, 1, 1) * 6) +
77
+            (substr($personCode, 2, 1) * 3) +
78
+            (substr($personCode, 3, 1) * 7) +
79
+            (substr($personCode, 4, 1) * 9) +
80 80
             (substr($personCode, 5, 1) * 10) +
81
-            (substr($personCode, 6, 1) * 5)  +
82
-            (substr($personCode, 7, 1) * 8)  +
83
-            (substr($personCode, 8, 1) * 4)  +
81
+            (substr($personCode, 6, 1) * 5) +
82
+            (substr($personCode, 7, 1) * 8) +
83
+            (substr($personCode, 8, 1) * 4) +
84 84
             (substr($personCode, 9, 1) * 2);
85 85
         // @formatter:on
86 86
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         ];
156 156
 
157 157
         foreach ($functions as $key => $function) {
158
-            if(is_numeric($key)){
158
+            if (is_numeric($key)) {
159 159
                 $key = $function;
160 160
                 $function = array_values($function);
161 161
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
         ];
156 156
 
157 157
         foreach ($functions as $key => $function) {
158
-            if(is_numeric($key)){
158
+            if(is_numeric($key)) {
159 159
                 $key = $function;
160 160
                 $function = array_values($function);
161 161
             }
Please login to merge, or discard this patch.