@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public static function decode($data) |
| 59 | 59 | { |
| 60 | - if (! $data instanceof ByteBuffer) { |
|
| 60 | + if (!$data instanceof ByteBuffer) { |
|
| 61 | 61 | $data = new ByteBuffer($data); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public static function decodeInPlace($data, int $startoffset, ?int $endOffset = null) |
| 84 | 84 | { |
| 85 | - if (! $data instanceof ByteBuffer) { |
|
| 85 | + if (!$data instanceof ByteBuffer) { |
|
| 86 | 86 | $data = new ByteBuffer($data); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -39,8 +39,7 @@ discard block |
||
| 39 | 39 | * @class CborDecoder |
| 40 | 40 | * @package Platine\Webauthn\Helper |
| 41 | 41 | */ |
| 42 | -class CborDecoder |
|
| 43 | -{ |
|
| 42 | +class CborDecoder { |
|
| 44 | 43 | public const CBOR_MAJOR_UNSIGNED_INT = 0; |
| 45 | 44 | public const CBOR_MAJOR_NEGATIVE_INT = 1; |
| 46 | 45 | public const CBOR_MAJOR_BYTE_STRING = 2; |
@@ -55,8 +54,7 @@ discard block |
||
| 55 | 54 | * @param ByteBuffer|string $data |
| 56 | 55 | * @return mixed |
| 57 | 56 | */ |
| 58 | - public static function decode($data) |
|
| 59 | - { |
|
| 57 | + public static function decode($data) { |
|
| 60 | 58 | if (! $data instanceof ByteBuffer) { |
| 61 | 59 | $data = new ByteBuffer($data); |
| 62 | 60 | } |
@@ -80,8 +78,7 @@ discard block |
||
| 80 | 78 | * @param int|null $endOffset |
| 81 | 79 | * @return mixed |
| 82 | 80 | */ |
| 83 | - public static function decodeInPlace($data, int $startoffset, ?int $endOffset = null) |
|
| 84 | - { |
|
| 81 | + public static function decodeInPlace($data, int $startoffset, ?int $endOffset = null) { |
|
| 85 | 82 | if (! $data instanceof ByteBuffer) { |
| 86 | 83 | $data = new ByteBuffer($data); |
| 87 | 84 | } |
@@ -99,8 +96,7 @@ discard block |
||
| 99 | 96 | * @param int $offset |
| 100 | 97 | * @return mixed |
| 101 | 98 | */ |
| 102 | - protected static function parseItem(ByteBuffer $buffer, int &$offset) |
|
| 103 | - { |
|
| 99 | + protected static function parseItem(ByteBuffer $buffer, int &$offset) { |
|
| 104 | 100 | $first = $buffer->getByteValue($offset++); |
| 105 | 101 | $type = $first >> 5; |
| 106 | 102 | $value = $first & 0b11111; |
@@ -120,8 +116,7 @@ discard block |
||
| 120 | 116 | * @param int $offset |
| 121 | 117 | * @return mixed |
| 122 | 118 | */ |
| 123 | - protected static function parseSimpleFloat(int $value, ByteBuffer $buffer, int &$offset) |
|
| 124 | - { |
|
| 119 | + protected static function parseSimpleFloat(int $value, ByteBuffer $buffer, int &$offset) { |
|
| 125 | 120 | switch ($value) { |
| 126 | 121 | case 24: |
| 127 | 122 | $value = $buffer->getByteValue($offset); |
@@ -188,8 +183,7 @@ discard block |
||
| 188 | 183 | * @param int $offset |
| 189 | 184 | * @return mixed |
| 190 | 185 | */ |
| 191 | - protected static function parseItemData(int $type, int $value, ByteBuffer $buffer, int &$offset) |
|
| 192 | - { |
|
| 186 | + protected static function parseItemData(int $type, int $value, ByteBuffer $buffer, int &$offset) { |
|
| 193 | 187 | switch ($type) { |
| 194 | 188 | case self::CBOR_MAJOR_UNSIGNED_INT: |
| 195 | 189 | return $value; |
@@ -40,8 +40,7 @@ discard block |
||
| 40 | 40 | * @class BaseFormat |
| 41 | 41 | * @package Platine\Webauthn\Attestation\Format |
| 42 | 42 | */ |
| 43 | -abstract class BaseFormat implements JsonSerializable |
|
| 44 | -{ |
|
| 43 | +abstract class BaseFormat implements JsonSerializable { |
|
| 45 | 44 | /** |
| 46 | 45 | * The attestation object data |
| 47 | 46 | * @var array<string|int, mixed> |
@@ -82,8 +81,7 @@ discard block |
||
| 82 | 81 | /** |
| 83 | 82 | * Destructor |
| 84 | 83 | */ |
| 85 | - public function __destruct() |
|
| 86 | - { |
|
| 84 | + public function __destruct() { |
|
| 87 | 85 | // delete X.509 chain certificate file after use |
| 88 | 86 | if ($this->x5cTempFile !== null && is_file($this->x5cTempFile)) { |
| 89 | 87 | unlink($this->x5cTempFile); |
@@ -141,8 +139,7 @@ discard block |
||
| 141 | 139 | * {@inheritdoc} |
| 142 | 140 | * @return mixed |
| 143 | 141 | */ |
| 144 | - public function jsonSerialize() |
|
| 145 | - { |
|
| 142 | + public function jsonSerialize() { |
|
| 146 | 143 | return get_object_vars($this); |
| 147 | 144 | } |
| 148 | 145 | |