@@ -193,9 +193,9 @@ |
||
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
| 196 | - * {@inheritdoc} |
|
| 197 | - * @return mixed |
|
| 198 | - */ |
|
| 196 | + * {@inheritdoc} |
|
| 197 | + * @return mixed |
|
| 198 | + */ |
|
| 199 | 199 | public function jsonSerialize(): mixed |
| 200 | 200 | { |
| 201 | 201 | return get_object_vars($this); |
@@ -43,8 +43,7 @@ discard block |
||
| 43 | 43 | * @class CredentialPublicKey |
| 44 | 44 | * @package Platine\Webauthn\Entity |
| 45 | 45 | */ |
| 46 | -class CredentialPublicKey implements JsonSerializable |
|
| 47 | -{ |
|
| 46 | +class CredentialPublicKey implements JsonSerializable { |
|
| 48 | 47 | /* |
| 49 | 48 | * Cose encoded keys |
| 50 | 49 | */ |
@@ -117,8 +116,7 @@ discard block |
||
| 117 | 116 | * @param int $offset |
| 118 | 117 | * @param int $endOffset |
| 119 | 118 | */ |
| 120 | - public function __construct(string $binaryData, int $offset, int &$endOffset) |
|
| 121 | - { |
|
| 119 | + public function __construct(string $binaryData, int $offset, int &$endOffset) { |
|
| 122 | 120 | $enc = CborDecoder::decodeInPlace($binaryData, $offset, $endOffset); |
| 123 | 121 | |
| 124 | 122 | // COSE key-encoded elliptic curve public key in EC2 format |
@@ -127,9 +127,9 @@ |
||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
| 130 | - * {@inheritdoc} |
|
| 131 | - * @return mixed |
|
| 132 | - */ |
|
| 130 | + * {@inheritdoc} |
|
| 131 | + * @return mixed |
|
| 132 | + */ |
|
| 133 | 133 | public function jsonSerialize(): mixed |
| 134 | 134 | { |
| 135 | 135 | return get_object_vars($this); |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | * @class AuthenticatorSelection |
| 41 | 41 | * @package Platine\Webauthn\Entity |
| 42 | 42 | */ |
| 43 | -class AuthenticatorSelection implements JsonSerializable |
|
| 44 | -{ |
|
| 43 | +class AuthenticatorSelection implements JsonSerializable { |
|
| 45 | 44 | /** |
| 46 | 45 | * The authenticator attachment |
| 47 | 46 | * @var string |
@@ -109,9 +109,9 @@ |
||
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
| 112 | - * {@inheritdoc} |
|
| 113 | - * @return mixed |
|
| 114 | - */ |
|
| 112 | + * {@inheritdoc} |
|
| 113 | + * @return mixed |
|
| 114 | + */ |
|
| 115 | 115 | public function jsonSerialize(): mixed |
| 116 | 116 | { |
| 117 | 117 | return get_object_vars($this); |
@@ -39,8 +39,7 @@ discard block |
||
| 39 | 39 | * @class RelyingParty |
| 40 | 40 | * @package Platine\Webauthn\Entity |
| 41 | 41 | */ |
| 42 | -class RelyingParty implements JsonSerializable |
|
| 43 | -{ |
|
| 42 | +class RelyingParty implements JsonSerializable { |
|
| 44 | 43 | /** |
| 45 | 44 | * The relying party id |
| 46 | 45 | * @var string |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | * @param string $name |
| 66 | 65 | * @param string $logo |
| 67 | 66 | */ |
| 68 | - public function __construct(string $id, string $name, string $logo = '') |
|
| 69 | - { |
|
| 67 | + public function __construct(string $id, string $name, string $logo = '') { |
|
| 70 | 68 | $this->id = $id; |
| 71 | 69 | $this->name = $name; |
| 72 | 70 | $this->logo = $logo; |
@@ -105,9 +105,9 @@ |
||
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | - * {@inheritdoc} |
|
| 109 | - * @return mixed |
|
| 110 | - */ |
|
| 108 | + * {@inheritdoc} |
|
| 109 | + * @return mixed |
|
| 110 | + */ |
|
| 111 | 111 | public function jsonSerialize(): mixed |
| 112 | 112 | { |
| 113 | 113 | return get_object_vars($this); |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | * @param string $name |
| 67 | 67 | * @param string $displayName |
| 68 | 68 | */ |
| 69 | - public function __construct(ByteBuffer|string $id, string $name, string $displayName) |
|
| 69 | + public function __construct(ByteBuffer | string $id, string $name, string $displayName) |
|
| 70 | 70 | { |
| 71 | 71 | if (is_string($id)) { |
| 72 | 72 | $id = new ByteBuffer($id); |
@@ -40,8 +40,7 @@ discard block |
||
| 40 | 40 | * @class UserInfo |
| 41 | 41 | * @package Platine\Webauthn\Entity |
| 42 | 42 | */ |
| 43 | -class UserInfo implements JsonSerializable |
|
| 44 | -{ |
|
| 43 | +class UserInfo implements JsonSerializable { |
|
| 45 | 44 | /** |
| 46 | 45 | * The id |
| 47 | 46 | * @var ByteBuffer |
@@ -66,8 +65,7 @@ discard block |
||
| 66 | 65 | * @param string $name |
| 67 | 66 | * @param string $displayName |
| 68 | 67 | */ |
| 69 | - public function __construct(ByteBuffer|string $id, string $name, string $displayName) |
|
| 70 | - { |
|
| 68 | + public function __construct(ByteBuffer|string $id, string $name, string $displayName) { |
|
| 71 | 69 | if (is_string($id)) { |
| 72 | 70 | $id = new ByteBuffer($id); |
| 73 | 71 | } |
@@ -374,9 +374,9 @@ |
||
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | /** |
| 377 | - * {@inheritdoc} |
|
| 378 | - * @return mixed |
|
| 379 | - */ |
|
| 377 | + * {@inheritdoc} |
|
| 378 | + * @return mixed |
|
| 379 | + */ |
|
| 380 | 380 | public function jsonSerialize(): mixed |
| 381 | 381 | { |
| 382 | 382 | return get_object_vars($this); |
@@ -297,7 +297,7 @@ |
||
| 297 | 297 | * @param ByteBuffer|string $challenge |
| 298 | 298 | * @return $this |
| 299 | 299 | */ |
| 300 | - public function setChallenge(ByteBuffer|string $challenge): self |
|
| 300 | + public function setChallenge(ByteBuffer | string $challenge): self |
|
| 301 | 301 | { |
| 302 | 302 | if (is_string($challenge)) { |
| 303 | 303 | $challenge = new ByteBuffer($challenge); |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | * @class PublicKey |
| 41 | 41 | * @package Platine\Webauthn\Entity |
| 42 | 42 | */ |
| 43 | -class PublicKey implements JsonSerializable |
|
| 44 | -{ |
|
| 43 | +class PublicKey implements JsonSerializable { |
|
| 45 | 44 | /** |
| 46 | 45 | * Default timeout |
| 47 | 46 | * @var int |
@@ -139,9 +139,9 @@ |
||
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | /** |
| 142 | - * {@inheritdoc} |
|
| 143 | - * @return mixed |
|
| 144 | - */ |
|
| 142 | + * {@inheritdoc} |
|
| 143 | + * @return mixed |
|
| 144 | + */ |
|
| 145 | 145 | public function jsonSerialize(): mixed |
| 146 | 146 | { |
| 147 | 147 | return get_object_vars($this); |
@@ -40,8 +40,7 @@ discard block |
||
| 40 | 40 | * @class AttestedCredentialData |
| 41 | 41 | * @package Platine\Webauthn\Entity |
| 42 | 42 | */ |
| 43 | -class AttestedCredentialData implements JsonSerializable |
|
| 44 | -{ |
|
| 43 | +class AttestedCredentialData implements JsonSerializable { |
|
| 45 | 44 | /** |
| 46 | 45 | * The AAGUID of the authenticator |
| 47 | 46 | * @var string |
@@ -71,8 +70,7 @@ discard block |
||
| 71 | 70 | * Create new instance |
| 72 | 71 | * @param string $binaryData |
| 73 | 72 | */ |
| 74 | - public function __construct(string $binaryData) |
|
| 75 | - { |
|
| 73 | + public function __construct(string $binaryData) { |
|
| 76 | 74 | if (strlen($binaryData) <= 55) { |
| 77 | 75 | throw new WebauthnException('Attested credential data should be present but is missing'); |
| 78 | 76 | } |
@@ -105,9 +105,9 @@ |
||
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | - * {@inheritdoc} |
|
| 109 | - * @return mixed |
|
| 110 | - */ |
|
| 108 | + * {@inheritdoc} |
|
| 109 | + * @return mixed |
|
| 110 | + */ |
|
| 111 | 111 | public function jsonSerialize(): mixed |
| 112 | 112 | { |
| 113 | 113 | return get_object_vars($this); |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | * @param ByteBuffer|string $id |
| 66 | 66 | * @param array<string> $transports |
| 67 | 67 | */ |
| 68 | - public function __construct(ByteBuffer|string $id, array $transports = []) |
|
| 68 | + public function __construct(ByteBuffer | string $id, array $transports = []) |
|
| 69 | 69 | { |
| 70 | 70 | if (is_string($id)) { |
| 71 | 71 | $id = new ByteBuffer($id); |
@@ -40,8 +40,7 @@ discard block |
||
| 40 | 40 | * @class BaseCredential |
| 41 | 41 | * @package Platine\Webauthn\Entity |
| 42 | 42 | */ |
| 43 | -abstract class BaseCredential implements JsonSerializable |
|
| 44 | -{ |
|
| 43 | +abstract class BaseCredential implements JsonSerializable { |
|
| 45 | 44 | /** |
| 46 | 45 | * The type |
| 47 | 46 | * @var string |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | * @param ByteBuffer|string $id |
| 66 | 65 | * @param array<string> $transports |
| 67 | 66 | */ |
| 68 | - public function __construct(ByteBuffer|string $id, array $transports = []) |
|
| 69 | - { |
|
| 67 | + public function __construct(ByteBuffer|string $id, array $transports = []) { |
|
| 70 | 68 | if (is_string($id)) { |
| 71 | 69 | $id = new ByteBuffer($id); |
| 72 | 70 | } |
@@ -81,9 +81,9 @@ |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | - * {@inheritdoc} |
|
| 85 | - * @return mixed |
|
| 86 | - */ |
|
| 84 | + * {@inheritdoc} |
|
| 85 | + * @return mixed |
|
| 86 | + */ |
|
| 87 | 87 | public function jsonSerialize(): mixed |
| 88 | 88 | { |
| 89 | 89 | return get_object_vars($this); |
@@ -39,8 +39,7 @@ discard block |
||
| 39 | 39 | * @class PublicKeyCredentialParam |
| 40 | 40 | * @package Platine\Webauthn\Entity |
| 41 | 41 | */ |
| 42 | -class PublicKeyCredentialParam implements JsonSerializable |
|
| 43 | -{ |
|
| 42 | +class PublicKeyCredentialParam implements JsonSerializable { |
|
| 44 | 43 | /** |
| 45 | 44 | * The type |
| 46 | 45 | * @var string |
@@ -57,8 +56,7 @@ discard block |
||
| 57 | 56 | * Create new instance |
| 58 | 57 | * @param int $alg |
| 59 | 58 | */ |
| 60 | - public function __construct(int $alg) |
|
| 61 | - { |
|
| 59 | + public function __construct(int $alg) { |
|
| 62 | 60 | $this->alg = $alg; |
| 63 | 61 | } |
| 64 | 62 | |