Skip to content

Commit 3811d69

Browse files
authored
chore: code cleanup (#278)
1 parent 27ee05f commit 3811d69

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/JWT.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ private static function encodeDER($type, $value)
448448
* Encodes signature from a DER object.
449449
*
450450
* @param string $der binary signature in DER format
451-
* @param int $keySize the nubmer of bits in the key
451+
* @param int $keySize the number of bits in the key
452452
* @return string the signature
453453
*/
454454
private static function signatureFromDER($der, $keySize)

tests/JWTTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function testInvalidTokenWithNbfLeeway()
159159
"nbf" => time() + 65); // not before too far in future
160160
$encoded = JWT::encode($payload, 'my_key');
161161
$this->setExpectedException('Firebase\JWT\BeforeValidException');
162-
$decoded = JWT::decode($encoded, 'my_key', array('HS256'));
162+
JWT::decode($encoded, 'my_key', array('HS256'));
163163
JWT::$leeway = 0;
164164
}
165165

@@ -183,7 +183,7 @@ public function testInvalidTokenWithIatLeeway()
183183
"iat" => time() + 65); // issued too far in future
184184
$encoded = JWT::encode($payload, 'my_key');
185185
$this->setExpectedException('Firebase\JWT\BeforeValidException');
186-
$decoded = JWT::decode($encoded, 'my_key', array('HS256'));
186+
JWT::decode($encoded, 'my_key', array('HS256'));
187187
JWT::$leeway = 0;
188188
}
189189

@@ -194,7 +194,7 @@ public function testInvalidToken()
194194
"exp" => time() + 20); // time in the future
195195
$encoded = JWT::encode($payload, 'my_key');
196196
$this->setExpectedException('Firebase\JWT\SignatureInvalidException');
197-
$decoded = JWT::decode($encoded, 'my_key2', array('HS256'));
197+
JWT::decode($encoded, 'my_key2', array('HS256'));
198198
}
199199

200200
public function testNullKeyFails()
@@ -204,7 +204,7 @@ public function testNullKeyFails()
204204
"exp" => time() + JWT::$leeway + 20); // time in the future
205205
$encoded = JWT::encode($payload, 'my_key');
206206
$this->setExpectedException('InvalidArgumentException');
207-
$decoded = JWT::decode($encoded, null, array('HS256'));
207+
JWT::decode($encoded, null, array('HS256'));
208208
}
209209

210210
public function testEmptyKeyFails()
@@ -214,7 +214,7 @@ public function testEmptyKeyFails()
214214
"exp" => time() + JWT::$leeway + 20); // time in the future
215215
$encoded = JWT::encode($payload, 'my_key');
216216
$this->setExpectedException('InvalidArgumentException');
217-
$decoded = JWT::decode($encoded, '', array('HS256'));
217+
JWT::decode($encoded, '', array('HS256'));
218218
}
219219

220220
public function testRSEncodeDecode()

0 commit comments

Comments
 (0)