Passed
Pull Request — master (#22)
by
unknown
06:15
created
migrations/2020_01_18_000001_create_mobile_verification_tokens_table.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function up(): void
41 41
     {
42
-        Schema::create($this->tokenTable, static function (Blueprint $table) {
42
+        Schema::create($this->tokenTable, static function(Blueprint $table) {
43 43
             $table->increments('id');
44 44
             $table->string('mobile')->index();
45 45
             $table->string('token', 10)->index();
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
             $table->index(['mobile', 'token']);
49 49
         });
50 50
 
51
-        if (! Schema::hasColumn($this->userTable, $this->mobileColumn)) {
52
-            Schema::table($this->userTable, function (Blueprint $table) {
51
+        if (!Schema::hasColumn($this->userTable, $this->mobileColumn)) {
52
+            Schema::table($this->userTable, function(Blueprint $table) {
53 53
                 $table->string($this->mobileColumn);
54 54
             });
55 55
         }
56 56
 
57
-        if (! Schema::hasColumn($this->userTable, 'mobile_verified_at')) {
58
-            Schema::table($this->userTable, function (Blueprint $table) {
57
+        if (!Schema::hasColumn($this->userTable, 'mobile_verified_at')) {
58
+            Schema::table($this->userTable, function(Blueprint $table) {
59 59
                 $table->timestamp('mobile_verified_at')->nullable()->after($this->mobileColumn);
60 60
             });
61 61
         }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         Schema::drop($this->tokenTable);
72 72
 
73
-        Schema::table($this->userTable, static function (Blueprint $table) {
73
+        Schema::table($this->userTable, static function(Blueprint $table) {
74 74
             $table->dropColumn('mobile_verified_at');
75 75
         });
76 76
     }
Please login to merge, or discard this patch.
src/Listeners/SendMobileVerificationNotification.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         $user = $event->user;
39 39
 
40
-        if ($user instanceof MustVerifyMobile && ! $user->hasVerifiedMobile()) {
40
+        if ($user instanceof MustVerifyMobile && !$user->hasVerifiedMobile()) {
41 41
             $this->tokenBroker->sendToken($user);
42 42
         }
43 43
     }
Please login to merge, or discard this patch.
src/Tokens/DatabaseTokenRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
             ->where('token', $token)
102 102
             ->first();
103 103
 
104
-        return $record && ! $this->tokenExpired($record['expires_at']);
104
+        return $record && !$this->tokenExpired($record['expires_at']);
105 105
     }
106 106
 
107 107
     /**
Please login to merge, or discard this patch.
src/Http/Middleware/EnsureMobileIsVerified.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     {
21 21
         $user = auth()->user();
22 22
 
23
-        if (! $user || ($user instanceof MustVerifyMobile && ! $user->hasVerifiedMobile())) {
23
+        if (!$user || ($user instanceof MustVerifyMobile && !$user->hasVerifiedMobile())) {
24 24
             return $request->expectsJson()
25 25
                 ? abort(403, 'Your mobile number is not verified.')
26 26
                 : redirect('/')->withErrors(['mobile' => 'Your mobile number is not verified.']);
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     protected function registerRoutes(): void
56 56
     {
57
-        Route::group($this->routeConfiguration(), function () {
57
+        Route::group($this->routeConfiguration(), function() {
58 58
             $this->loadRoutesFrom(__DIR__.'/Http/routes.php');
59 59
         });
60 60
     }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     protected function registerBindings(): void
94 94
     {
95
-        $this->app->singleton(SMSClient::class, static function ($app) {
95
+        $this->app->singleton(SMSClient::class, static function($app) {
96 96
             try {
97 97
                 return $app->make(config('mobile_verifier.sms_client'));
98 98
             } catch (Throwable $e) {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             }
101 101
         });
102 102
 
103
-        $this->app->bind(TokenRepositoryInterface::class, static function ($app) {
103
+        $this->app->bind(TokenRepositoryInterface::class, static function($app) {
104 104
             return new DatabaseTokenRepository(
105 105
                 $app->make(ConnectionInterface::class),
106 106
                 config('mobile_verifier.token_table', 'mobile_verification_tokens'),
Please login to merge, or discard this patch.
src/Notifications/Channels/VerificationChannel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function send($notifiable, Notification $notification)
37 37
     {
38
-        if (! $notifiable->routeNotificationFor('verification_mobile', $notification)) {
38
+        if (!$notifiable->routeNotificationFor('verification_mobile', $notification)) {
39 39
             return;
40 40
         }
41 41
 
Please login to merge, or discard this patch.