Skip to content

Commit 0cab4ce

Browse files
committed
Add more tests and clear the values
Code Coverage Report: 2020-11-02 17:00:32 Summary: Classes: 80.00% (4/5) Methods: 86.67% (26/30) Lines: 86.98% (167/192) Samyoul\U2F\U2FServer\Registration Methods: 100.00% ( 7/ 7) Lines: 100.00% ( 10/ 10) Samyoul\U2F\U2FServer\RegistrationRequest Methods: 100.00% ( 5/ 5) Lines: 100.00% ( 9/ 9) Samyoul\U2F\U2FServer\SignRequest Methods: 100.00% ( 6/ 6) Lines: 100.00% ( 12/ 12) Samyoul\U2F\U2FServer\U2FException Methods: 100.00% ( 1/ 1) Lines: 100.00% ( 2/ 2) Samyoul\U2F\U2FServer\U2FServer Methods: 63.64% ( 7/11) Lines: 84.28% (134/159)
1 parent 4a63bbc commit 0cab4ce

File tree

2 files changed

+279
-89
lines changed

2 files changed

+279
-89
lines changed

src/U2FServer.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ public static function makeRegistration($appId, array $registrations = [])
8484
public static function register(RegistrationRequest $request, $response, $attestDir = null, $includeCert = true)
8585
{
8686
// Parameter Checks
87-
if( !is_object( $request ) ) {
88-
throw new \InvalidArgumentException('$request of register() method only accepts object.');
89-
}
87+
// $request is safe because of the php typehint
9088

9189
if( !is_object( $response ) ) {
9290
throw new \InvalidArgumentException('$response of register() method only accepts object.');

0 commit comments

Comments
 (0)