Completed
Push — develop ( 82de8f...bd9a33 )
by Wisoot
02:14
created
src/database/migrations/2014_10_12_200000_create_user_tokens_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function up()
36 36
     {
37
-        Schema::create($this->table, function (Blueprint $table) {
37
+        Schema::create($this->table, function(Blueprint $table) {
38 38
             $table->increments('id');
39 39
             $table->integer($this->foreignKey)->unsigned();
40 40
             $table->string('token')->index();
Please login to merge, or discard this patch.
src/JwtGuard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
      */
184 184
     protected function hasValidCredentials($user, $credentials)
185 185
     {
186
-        return ! is_null($user) && $this->provider->validateCredentials($user, $credentials);
186
+        return !is_null($user) && $this->provider->validateCredentials($user, $credentials);
187 187
     }
188 188
 
189 189
     /**
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     /**
127 127
      * Remove given token from the given user
128 128
      * 
129
-     * @param $user
129
+     * @param AuthenticatableContract|null $user
130 130
      * @param Payload $payload
131 131
      */
132 132
     protected function removeUserToken($user, Payload $payload)
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     /**
176 176
      * Determine if the user matches the credentials.
177 177
      *
178
-     * @param mixed $user
178
+     * @param AuthenticatableContract|null $user
179 179
      * @param array $credentials
180 180
      * @return bool
181 181
      */
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
     /**
397 397
      * getToken method
398 398
      *
399
-     * @return null|string
399
+     * @return string
400 400
      */
401 401
     public function getToken()
402 402
     {
Please login to merge, or discard this patch.
src/Providers/JwtGuardServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $this->publishConfig();
36 36
 
37 37
         $this->publishes([
38
-            __DIR__ . '/../database/migrations/' => database_path('migrations')
38
+            __DIR__.'/../database/migrations/' => database_path('migrations')
39 39
         ], 'migrations');
40 40
     }
41 41
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     private function publishConfig()
48 48
     {
49
-        $configFile = __DIR__ . '/../config/jwt_guard.php';
49
+        $configFile = __DIR__.'/../config/jwt_guard.php';
50 50
 
51 51
         $this->publishes([
52 52
             $configFile => config_path('jwt_guard.php')
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 
67 67
         $this->app->bind(TokenManagerContract::class, TokenManager::class);
68 68
 
69
-        $this->app->rebinding('request', function ($app, $request) {
70
-            $request->setUserResolver(function ($guard = null) {
69
+        $this->app->rebinding('request', function($app, $request) {
70
+            $request->setUserResolver(function($guard = null) {
71 71
                 return auth()->guard($guard)->user();
72 72
             });
73 73
         });
Please login to merge, or discard this patch.
src/TokenManager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      * add claim to the white list
32 32
      *
33 33
      * @param Claim $claim
34
-     * @return bool
34
+     * @return boolean|null
35 35
      */
36 36
     public function add(Claim $claim)
37 37
     {
Please login to merge, or discard this patch.
src/Claim.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         }
62 62
 
63 63
         if (empty($this->jti)) {
64
-            $this->jti = md5("{$this->sub}.{$this->iat}." . rand(1000, 1999));
64
+            $this->jti = md5("{$this->sub}.{$this->iat}.".rand(1000, 1999));
65 65
         }
66 66
     }
67 67
 
Please login to merge, or discard this patch.
src/JwtService.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     /**
62 62
      * getUserIdFromToken method
63 63
      *
64
-     * @param $token
64
+     * @param string $token
65 65
      * @return mixed
66 66
      * @throws InaccessibleException
67 67
      * @throws MalformedException
Please login to merge, or discard this patch.