Passed
Push — master ( 2a00ac...8d9f8b )
by xu
02:49
created
src/ServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
      */
21 21
     public function boot()
22 22
     {
23
-        Validator::extend('idcard', function ($attribute, $value, $parameters, $validator) {
23
+        Validator::extend('idcard', function($attribute, $value, $parameters, $validator) {
24 24
             return IdCard::passes($value);
25 25
         });
26 26
 
27
-        Validator::replacer('idcard', function ($message, $attribute, $rule, $parameters) {
27
+        Validator::replacer('idcard', function($message, $attribute, $rule, $parameters) {
28 28
             return '无效的身份证号码';
29 29
         });
30 30
     }
Please login to merge, or discard this patch.
src/IdCard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
 
92 92
         $sum = 0;
93 93
 
94
-        for ($i = 17; $i > 0; $i --) {
94
+        for ($i = 17; $i > 0; $i--) {
95 95
             $s = pow(2, $i) % 11;
96 96
 
97 97
             $sum += $s * $idcard[17 - $i];
Please login to merge, or discard this patch.