Skip to content

Commit 4002b77

Browse files
authored
Apply fixes from StyleCI (tymondesigns#2176)
[ci skip] [skip ci]
1 parent 3ffeec4 commit 4002b77

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+48
-226
lines changed

src/Blacklist.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class Blacklist
4848
* Constructor.
4949
*
5050
* @param \Tymon\JWTAuth\Contracts\Providers\Storage $storage
51-
*
5251
* @return void
5352
*/
5453
public function __construct(Storage $storage)
@@ -60,7 +59,6 @@ public function __construct(Storage $storage)
6059
* Add the token (jti claim) to the blacklist.
6160
*
6261
* @param \Tymon\JWTAuth\Payload $payload
63-
*
6462
* @return bool
6563
*/
6664
public function add(Payload $payload)
@@ -89,7 +87,6 @@ public function add(Payload $payload)
8987
* Get the number of minutes until the token expiry.
9088
*
9189
* @param \Tymon\JWTAuth\Payload $payload
92-
*
9390
* @return int
9491
*/
9592
protected function getMinutesUntilExpired(Payload $payload)
@@ -107,7 +104,6 @@ protected function getMinutesUntilExpired(Payload $payload)
107104
* Add the token (jti claim) to the blacklist indefinitely.
108105
*
109106
* @param \Tymon\JWTAuth\Payload $payload
110-
*
111107
* @return bool
112108
*/
113109
public function addForever(Payload $payload)
@@ -121,7 +117,6 @@ public function addForever(Payload $payload)
121117
* Determine whether the token has been blacklisted.
122118
*
123119
* @param \Tymon\JWTAuth\Payload $payload
124-
*
125120
* @return bool
126121
*/
127122
public function has(Payload $payload)
@@ -141,7 +136,6 @@ public function has(Payload $payload)
141136
* Remove the token (jti claim) from the blacklist.
142137
*
143138
* @param \Tymon\JWTAuth\Payload $payload
144-
*
145139
* @return bool
146140
*/
147141
public function remove(Payload $payload)
@@ -176,7 +170,6 @@ protected function getGraceTimestamp()
176170
* Set the grace period.
177171
*
178172
* @param int $gracePeriod
179-
*
180173
* @return $this
181174
*/
182175
public function setGracePeriod($gracePeriod)
@@ -200,7 +193,6 @@ public function getGracePeriod()
200193
* Get the unique key held within the blacklist.
201194
*
202195
* @param \Tymon\JWTAuth\Payload $payload
203-
*
204196
* @return mixed
205197
*/
206198
public function getKey(Payload $payload)
@@ -212,7 +204,6 @@ public function getKey(Payload $payload)
212204
* Set the unique key held within the blacklist.
213205
*
214206
* @param string $key
215-
*
216207
* @return $this
217208
*/
218209
public function setKey($key)
@@ -226,7 +217,6 @@ public function setKey($key)
226217
* Set the refresh time limit.
227218
*
228219
* @param int $ttl
229-
*
230220
* @return $this
231221
*/
232222
public function setRefreshTTL($ttl)

src/Claims/Claim.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ abstract class Claim implements Arrayable, ClaimContract, Jsonable, JsonSerializ
3434

3535
/**
3636
* @param mixed $value
37-
*
3837
* @return void
3938
*/
4039
public function __construct($value)
@@ -46,10 +45,9 @@ public function __construct($value)
4645
* Set the claim value, and call a validate method.
4746
*
4847
* @param mixed $value
48+
* @return $this
4949
*
5050
* @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException
51-
*
52-
* @return $this
5351
*/
5452
public function setValue($value)
5553
{
@@ -72,7 +70,6 @@ public function getValue()
7270
* Set the claim name.
7371
*
7472
* @param string $name
75-
*
7673
* @return $this
7774
*/
7875
public function setName($name)
@@ -96,7 +93,6 @@ public function getName()
9693
* Validate the claim in a standalone Claim context.
9794
*
9895
* @param mixed $value
99-
*
10096
* @return bool
10197
*/
10298
public function validateCreate($value)
@@ -118,7 +114,6 @@ public function validatePayload()
118114
* Validate the Claim within a refresh context.
119115
*
120116
* @param int $refreshTTL
121-
*
122117
* @return bool
123118
*/
124119
public function validateRefresh($refreshTTL)
@@ -131,7 +126,6 @@ public function validateRefresh($refreshTTL)
131126
*
132127
* @param mixed $value
133128
* @param bool $strict
134-
*
135129
* @return bool
136130
*/
137131
public function matches($value, $strict = true)
@@ -163,7 +157,6 @@ public function toArray()
163157
* Get the claim as JSON.
164158
*
165159
* @param int $options
166-
*
167160
* @return string
168161
*/
169162
public function toJson($options = JSON_UNESCAPED_SLASHES)

src/Claims/Collection.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class Collection extends IlluminateCollection
2020
* Create a new collection.
2121
*
2222
* @param mixed $items
23-
*
2423
* @return void
2524
*/
2625
public function __construct($items = [])
@@ -34,7 +33,6 @@ public function __construct($items = [])
3433
* @param string $name
3534
* @param callable $callback
3635
* @param mixed $default
37-
*
3836
* @return \Tymon\JWTAuth\Claims\Claim
3937
*/
4038
public function getByClaimName($name, callable $callback = null, $default = null)
@@ -48,7 +46,6 @@ public function getByClaimName($name, callable $callback = null, $default = null
4846
* Validate each claim under a given context.
4947
*
5048
* @param string $context
51-
*
5249
* @return $this
5350
*/
5451
public function validate($context = 'payload')
@@ -70,7 +67,6 @@ public function validate($context = 'payload')
7067
* Determine if the Collection contains all of the given keys.
7168
*
7269
* @param mixed $claims
73-
*
7470
* @return bool
7571
*/
7672
public function hasAllClaims($claims)
@@ -102,7 +98,6 @@ protected function getArrayableItems($items)
10298
* Ensure that the given claims array is keyed by the claim name.
10399
*
104100
* @param mixed $items
105-
*
106101
* @return array
107102
*/
108103
private function sanitizeClaims($items)

src/Claims/Custom.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class Custom extends Claim
1616
/**
1717
* @param string $name
1818
* @param mixed $value
19-
*
2019
* @return void
2120
*/
2221
public function __construct($name, $value)

src/Claims/DatetimeTrait.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ trait DatetimeTrait
2929
* Set the claim value, and call a validate method.
3030
*
3131
* @param mixed $value
32+
* @return $this
3233
*
3334
* @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException
34-
*
35-
* @return $this
3635
*/
3736
public function setValue($value)
3837
{
@@ -63,7 +62,6 @@ public function validateCreate($value)
6362
* Determine whether the value is in the future.
6463
*
6564
* @param mixed $value
66-
*
6765
* @return bool
6866
*/
6967
protected function isFuture($value)
@@ -75,7 +73,6 @@ protected function isFuture($value)
7573
* Determine whether the value is in the past.
7674
*
7775
* @param mixed $value
78-
*
7976
* @return bool
8077
*/
8178
protected function isPast($value)
@@ -87,7 +84,6 @@ protected function isPast($value)
8784
* Set the leeway in seconds.
8885
*
8986
* @param int $leeway
90-
*
9187
* @return $this
9288
*/
9389
public function setLeeway($leeway)

src/Claims/Factory.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class Factory
5757
* Constructor.
5858
*
5959
* @param \Illuminate\Http\Request $request
60-
*
6160
* @return void
6261
*/
6362
public function __construct(Request $request)
@@ -70,7 +69,6 @@ public function __construct(Request $request)
7069
*
7170
* @param string $name
7271
* @param mixed $value
73-
*
7472
* @return \Tymon\JWTAuth\Claims\Claim
7573
*/
7674
public function get($name, $value)
@@ -90,7 +88,6 @@ public function get($name, $value)
9088
* Check whether the claim exists.
9189
*
9290
* @param string $name
93-
*
9491
* @return bool
9592
*/
9693
public function has($name)
@@ -102,7 +99,6 @@ public function has($name)
10299
* Generate the initial value and return the Claim instance.
103100
*
104101
* @param string $name
105-
*
106102
* @return \Tymon\JWTAuth\Claims\Claim
107103
*/
108104
public function make($name)
@@ -165,7 +161,6 @@ public function jti()
165161
*
166162
* @param string $name
167163
* @param string $classPath
168-
*
169164
* @return $this
170165
*/
171166
public function extend($name, $classPath)
@@ -179,7 +174,6 @@ public function extend($name, $classPath)
179174
* Set the request instance.
180175
*
181176
* @param \Illuminate\Http\Request $request
182-
*
183177
* @return $this
184178
*/
185179
public function setRequest(Request $request)
@@ -193,7 +187,6 @@ public function setRequest(Request $request)
193187
* Set the token ttl (in minutes).
194188
*
195189
* @param int $ttl
196-
*
197190
* @return $this
198191
*/
199192
public function setTTL($ttl)
@@ -217,7 +210,6 @@ public function getTTL()
217210
* Set the leeway in seconds.
218211
*
219212
* @param int $leeway
220-
*
221213
* @return $this
222214
*/
223215
public function setLeeway($leeway)

src/Console/JWTGenerateSecretCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public function handle()
8282
* Display the key.
8383
*
8484
* @param string $key
85-
*
8685
* @return void
8786
*/
8887
protected function displayKey($key)

src/Contracts/Claim.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ interface Claim
1717
* Set the claim value, and call a validate method.
1818
*
1919
* @param mixed $value
20+
* @return $this
2021
*
2122
* @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException
22-
*
23-
* @return $this
2423
*/
2524
public function setValue($value);
2625

@@ -35,7 +34,6 @@ public function getValue();
3534
* Set the claim name.
3635
*
3736
* @param string $name
38-
*
3937
* @return $this
4038
*/
4139
public function setName($name);
@@ -51,7 +49,6 @@ public function getName();
5149
* Validate the Claim value.
5250
*
5351
* @param mixed $value
54-
*
5552
* @return bool
5653
*/
5754
public function validateCreate($value);

src/Contracts/Http/Parser.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ interface Parser
1919
* Parse the request.
2020
*
2121
* @param \Illuminate\Http\Request $request
22-
*
2322
* @return null|string
2423
*/
2524
public function parse(Request $request);

src/Contracts/Providers/Auth.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ interface Auth
1717
* Check a user's credentials.
1818
*
1919
* @param array $credentials
20-
*
2120
* @return mixed
2221
*/
2322
public function byCredentials(array $credentials);
@@ -26,7 +25,6 @@ public function byCredentials(array $credentials);
2625
* Authenticate a user via the id.
2726
*
2827
* @param mixed $id
29-
*
3028
* @return mixed
3129
*/
3230
public function byId($id);

src/Contracts/Providers/JWT.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ interface JWT
1515
{
1616
/**
1717
* @param array $payload
18-
*
1918
* @return string
2019
*/
2120
public function encode(array $payload);
2221

2322
/**
2423
* @param string $token
25-
*
2624
* @return array
2725
*/
2826
public function decode($token);

src/Contracts/Providers/Storage.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,25 @@ interface Storage
1717
* @param string $key
1818
* @param mixed $value
1919
* @param int $minutes
20-
*
2120
* @return void
2221
*/
2322
public function add($key, $value, $minutes);
2423

2524
/**
2625
* @param string $key
2726
* @param mixed $value
28-
*
2927
* @return void
3028
*/
3129
public function forever($key, $value);
3230

3331
/**
3432
* @param string $key
35-
*
3633
* @return mixed
3734
*/
3835
public function get($key);
3936

4037
/**
4138
* @param string $key
42-
*
4339
* @return bool
4440
*/
4541
public function destroy($key);

0 commit comments

Comments
 (0)