Completed
Push — master ( eab122...829e0e )
by xu
05:42
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
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
         $day = (int) substr($idcard, 12, 2);
86 86
         $year = (int) substr($idcard, 6, 4);
87 87
 
88
-        if (! checkdate($month, $day, $year)) {
88
+        if (!checkdate($month, $day, $year)) {
89 89
             return false;
90 90
         }
91 91
 
Please login to merge, or discard this patch.