@@ -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 |
@@ -188,9 +188,9 @@ |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * {@inheritdoc} |
|
| 192 | - * @return mixed |
|
| 193 | - */ |
|
| 191 | + * {@inheritdoc} |
|
| 192 | + * @return mixed |
|
| 193 | + */ |
|
| 194 | 194 | public function jsonSerialize(): mixed |
| 195 | 195 | { |
| 196 | 196 | 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 |
@@ -188,9 +188,9 @@ |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * {@inheritdoc} |
|
| 192 | - * @return mixed |
|
| 193 | - */ |
|
| 191 | + * {@inheritdoc} |
|
| 192 | + * @return mixed |
|
| 193 | + */ |
|
| 194 | 194 | public function jsonSerialize(): mixed |
| 195 | 195 | { |
| 196 | 196 | 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; |
@@ -188,9 +188,9 @@ |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * {@inheritdoc} |
|
| 192 | - * @return mixed |
|
| 193 | - */ |
|
| 191 | + * {@inheritdoc} |
|
| 192 | + * @return mixed |
|
| 193 | + */ |
|
| 194 | 194 | public function jsonSerialize(): mixed |
| 195 | 195 | { |
| 196 | 196 | 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 | } |
@@ -188,9 +188,9 @@ |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * {@inheritdoc} |
|
| 192 | - * @return mixed |
|
| 193 | - */ |
|
| 191 | + * {@inheritdoc} |
|
| 192 | + * @return mixed |
|
| 193 | + */ |
|
| 194 | 194 | public function jsonSerialize(): mixed |
| 195 | 195 | { |
| 196 | 196 | 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 |
@@ -188,9 +188,9 @@ |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * {@inheritdoc} |
|
| 192 | - * @return mixed |
|
| 193 | - */ |
|
| 191 | + * {@inheritdoc} |
|
| 192 | + * @return mixed |
|
| 193 | + */ |
|
| 194 | 194 | public function jsonSerialize(): mixed |
| 195 | 195 | { |
| 196 | 196 | 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 | } |
@@ -188,9 +188,9 @@ |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * {@inheritdoc} |
|
| 192 | - * @return mixed |
|
| 193 | - */ |
|
| 191 | + * {@inheritdoc} |
|
| 192 | + * @return mixed |
|
| 193 | + */ |
|
| 194 | 194 | public function jsonSerialize(): mixed |
| 195 | 195 | { |
| 196 | 196 | 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 | } |
@@ -188,9 +188,9 @@ |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * {@inheritdoc} |
|
| 192 | - * @return mixed |
|
| 193 | - */ |
|
| 191 | + * {@inheritdoc} |
|
| 192 | + * @return mixed |
|
| 193 | + */ |
|
| 194 | 194 | public function jsonSerialize(): mixed |
| 195 | 195 | { |
| 196 | 196 | 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 | |
@@ -188,9 +188,9 @@ |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * {@inheritdoc} |
|
| 192 | - * @return mixed |
|
| 193 | - */ |
|
| 191 | + * {@inheritdoc} |
|
| 192 | + * @return mixed |
|
| 193 | + */ |
|
| 194 | 194 | public function jsonSerialize(): mixed |
| 195 | 195 | { |
| 196 | 196 | return get_object_vars($this); |