Passed
Push — develop ( d68d1b...4b2eb4 )
by nguereza
01:51
created
src/Enum/AttestationType.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
  * @class AttestationType
9 9
  * @package Platine\Webauthn\Enum
10 10
  */
11
-class AttestationType extends BaseEnum
12
-{
11
+class AttestationType extends BaseEnum {
13 12
     public const NONE = 'none';
14 13
     public const DIRECT = 'direct';
15 14
     public const INDIRECT = 'indirect';
Please login to merge, or discard this patch.
src/Enum/TransportType.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
  * @class TransportType
9 9
  * @package Platine\Webauthn\Enum
10 10
  */
11
-class TransportType extends BaseEnum
12
-{
11
+class TransportType extends BaseEnum {
13 12
     public const NFC = 'nfc';
14 13
     public const BLE = 'ble';
15 14
     public const USB = 'usb';
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
@@ -169,9 +169,9 @@
 block discarded – undo
169 169
     }
170 170
 
171 171
     /**
172
-    * {@inheritdoc}
173
-    * @return mixed
174
-    */
172
+     * {@inheritdoc}
173
+     * @return mixed
174
+     */
175 175
     public function jsonSerialize()
176 176
     {
177 177
         return get_object_vars($this);
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 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;
@@ -145,8 +143,7 @@  discard block
 block discarded – undo
145 143
     * {@inheritdoc}
146 144
     * @return mixed
147 145
     */
148
-    public function jsonSerialize()
149
-    {
146
+    public function jsonSerialize() {
150 147
         return get_object_vars($this);
151 148
     }
152 149
 }
Please login to merge, or discard this patch.
src/Enum/BaseEnum.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 BaseEnum
40 40
  * @package Platine\Webauthn\Enum
41 41
  */
42
-class BaseEnum
43
-{
42
+class BaseEnum {
44 43
     /**
45 44
      * Return this class all the enumerations
46 45
      * @return array<string>
Please login to merge, or discard this patch.
src/Entity/PublicKeyAuthParam.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,6 +37,5 @@
 block discarded – undo
37 37
  * @class PublicKeyAuthParam
38 38
  * @package Platine\Webauthn\Entity
39 39
  */
40
-class PublicKeyAuthParam extends BaseCredential
41
-{
40
+class PublicKeyAuthParam extends BaseCredential {
42 41
 }
Please login to merge, or discard this patch.
src/Entity/BaseCredential.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -169,9 +169,9 @@
 block discarded – undo
169 169
     }
170 170
 
171 171
     /**
172
-    * {@inheritdoc}
173
-    * @return mixed
174
-    */
172
+     * {@inheritdoc}
173
+     * @return mixed
174
+     */
175 175
     public function jsonSerialize()
176 176
     {
177 177
         return get_object_vars($this);
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
65 64
      * @param ByteBuffer|string $id
66 65
      * @param array<string> $transports
67 66
      */
68
-    public function __construct($id, array $transports = [])
69
-    {
67
+    public function __construct($id, array $transports = []) {
70 68
         if (is_string($id)) {
71 69
             $id = new ByteBuffer($id);
72 70
         }
@@ -108,8 +106,7 @@  discard block
 block discarded – undo
108 106
     * {@inheritdoc}
109 107
     * @return mixed
110 108
     */
111
-    public function jsonSerialize()
112
-    {
109
+    public function jsonSerialize() {
113 110
         return get_object_vars($this);
114 111
     }
115 112
 }
Please login to merge, or discard this patch.
src/Entity/UserCredential.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,6 +37,5 @@
 block discarded – undo
37 37
  * @class UserCredential
38 38
  * @package Platine\Webauthn\Entity
39 39
  */
40
-class UserCredential extends BaseCredential
41
-{
40
+class UserCredential extends BaseCredential {
42 41
 }
Please login to merge, or discard this patch.
src/Helper/CborDecoder.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@  discard block
 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;
@@ -55,8 +54,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.