Passed
Push — develop ( fb7a57...aef2d8 )
by nguereza
11:54
created
src/Helper/ByteBuffer.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -364,9 +364,9 @@  discard block
 block discarded – undo
364 364
     }
365 365
 
366 366
         /**
367
-     * Return the binary string
368
-     * @return string
369
-     */
367
+         * Return the binary string
368
+         * @return string
369
+         */
370 370
     public function getBinaryString(): string
371 371
     {
372 372
         return $this->data;
@@ -393,9 +393,9 @@  discard block
 block discarded – undo
393 393
     }
394 394
 
395 395
     /**
396
-    * {@inheritdoc}
397
-    * @return mixed
398
-    */
396
+     * {@inheritdoc}
397
+     * @return mixed
398
+     */
399 399
     public function jsonSerialize(): mixed
400 400
     {
401 401
         if ($this->useBase64UrlEncoding) {
@@ -409,18 +409,18 @@  discard block
 block discarded – undo
409 409
     }
410 410
 
411 411
     /**
412
-    * {@inheritdoc}
413
-    * @return string|null
414
-    */
412
+     * {@inheritdoc}
413
+     * @return string|null
414
+     */
415 415
     public function serialize(): ?string
416 416
     {
417 417
         return serialize($this->data);
418 418
     }
419 419
 
420 420
     /**
421
-    * {@inheritdoc}
422
-    * $param string $data
423
-    */
421
+     * {@inheritdoc}
422
+     * $param string $data
423
+     */
424 424
     public function unserialize(string $data): void
425 425
     {
426 426
         $value = unserialize($data);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@  discard block
 block discarded – undo
68 68
      * Create new instance
69 69
      * @param string $binaryData
70 70
      */
71
-    public function __construct(string $binaryData)
72
-    {
71
+    public function __construct(string $binaryData) {
73 72
         $this->data = (string)$binaryData;
74 73
         $this->length = strlen($binaryData);
75 74
     }
@@ -445,8 +444,7 @@  discard block
 block discarded – undo
445 444
      * @param array<string, mixed> $data
446 445
      * @return void
447 446
      */
448
-    public function __unserialize(array $data)
449
-    {
447
+    public function __unserialize(array $data) {
450 448
         if (isset($data['data'])) {
451 449
             $value = unserialize($data['data']);
452 450
             if ($value === false) {
Please login to merge, or discard this patch.
src/Helper/CborDecoder.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Attestation/AttestationData.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -188,9 +188,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@  discard block
 block discarded – undo
48 48
  * @class AttestationData
49 49
  * @package Platine\Webauthn\Attestation
50 50
  */
51
-class AttestationData implements JsonSerializable
52
-{
51
+class AttestationData implements JsonSerializable {
53 52
     /**
54 53
      * The AuthenticatorData instance
55 54
      * @var AuthenticatorData
@@ -73,8 +72,7 @@  discard block
 block discarded – undo
73 72
      * @param string $binary
74 73
      * @param array<string> $allowedFormats
75 74
      */
76
-    public function __construct(string $binary, array $allowedFormats)
77
-    {
75
+    public function __construct(string $binary, array $allowedFormats) {
78 76
         $enc = CborDecoder::decode($binary);
79 77
 
80 78
         if (! is_array($enc) || ! array_key_exists('fmt', $enc) || ! is_string($enc['fmt'])) {
Please login to merge, or discard this patch.
src/Attestation/AuthenticatorData.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -270,9 +270,9 @@
 block discarded – undo
270 270
 
271 271
 
272 272
     /**
273
-    * {@inheritdoc}
274
-    * @return mixed
275
-    */
273
+     * {@inheritdoc}
274
+     * @return mixed
275
+     */
276 276
     public function jsonSerialize(): mixed
277 277
     {
278 278
         return get_object_vars($this);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@  discard block
 block discarded – undo
44 44
  * @class AuthenticatorData
45 45
  * @package Platine\Webauthn\Attestation
46 46
  */
47
-class AuthenticatorData implements JsonSerializable
48
-{
47
+class AuthenticatorData implements JsonSerializable {
49 48
     public const EC2_TYPE = 2;
50 49
     public const RSA_TYPE = 3;
51 50
 
@@ -89,8 +88,7 @@  discard block
 block discarded – undo
89 88
      * Create new instance
90 89
      * @param string $binary
91 90
      */
92
-    public function __construct(string $binary)
93
-    {
91
+    public function __construct(string $binary) {
94 92
         if (strlen($binary) < 37) {
95 93
             throw new WebauthnException('Invalid authenticator data provided');
96 94
         }
Please login to merge, or discard this patch.
src/Attestation/Format/BaseFormat.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,9 +124,9 @@
 block discarded – undo
124 124
     }
125 125
 
126 126
     /**
127
-    * {@inheritdoc}
128
-    * @return mixed
129
-    */
127
+     * {@inheritdoc}
128
+     * @return mixed
129
+     */
130 130
     public function jsonSerialize(): mixed
131 131
     {
132 132
         return get_object_vars($this);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@  discard block
 block discarded – undo
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 X5C Chain data
47 46
      * @var array<string>
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
     /**
69 68
      * Destructor
70 69
      */
71
-    public function __destruct()
72
-    {
70
+    public function __destruct() {
73 71
         // delete X.509 chain certificate file after use
74 72
         if ($this->x5cTempFile !== null && is_file($this->x5cTempFile)) {
75 73
             unlink($this->x5cTempFile);
Please login to merge, or discard this patch.
src/Attestation/Format/Tpm.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
  * @class Tpm
42 42
  * @package Platine\Webauthn\Attestation\Format
43 43
  */
44
-class Tpm extends BaseFormat
45
-{
44
+class Tpm extends BaseFormat {
46 45
     public const TPM_GENERATED_VALUE = "\xFF\x54\x43\x47";
47 46
     public const TPM_ST_ATTEST_CERTIFY = "\x80\x17";
48 47
 
Please login to merge, or discard this patch.
src/Entity/CredentialPublicKey.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -193,9 +193,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Entity/AuthenticatorSelection.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -127,9 +127,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Entity/RelyingParty.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,9 +109,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.