@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWT\Parameter; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWT\Parameter; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWT\Parameter; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWT\Parameter; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWT\Parameter; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWT\Parameter; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWT\Parameter; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWT\Parameter; |
| 6 | 6 | |
@@ -15,28 +15,28 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | trait Base64UIntValue |
| 17 | 17 | { |
| 18 | - use Base64URLValue; |
|
| 18 | + use Base64URLValue; |
|
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * Initialize parameter from base10 number. |
|
| 22 | - * |
|
| 23 | - * @param int|string $number |
|
| 24 | - * |
|
| 25 | - * @return self |
|
| 26 | - */ |
|
| 27 | - public static function fromNumber($number): Parameter |
|
| 28 | - { |
|
| 29 | - $data = BigInt::fromBase10($number)->base256(); |
|
| 30 | - return static::fromString($data); |
|
| 31 | - } |
|
| 20 | + /** |
|
| 21 | + * Initialize parameter from base10 number. |
|
| 22 | + * |
|
| 23 | + * @param int|string $number |
|
| 24 | + * |
|
| 25 | + * @return self |
|
| 26 | + */ |
|
| 27 | + public static function fromNumber($number): Parameter |
|
| 28 | + { |
|
| 29 | + $data = BigInt::fromBase10($number)->base256(); |
|
| 30 | + return static::fromString($data); |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Get value as a number. |
|
| 35 | - * |
|
| 36 | - * @return BigInt |
|
| 37 | - */ |
|
| 38 | - public function number(): BigInt |
|
| 39 | - { |
|
| 40 | - return BigInt::fromBase256(Base64::urlDecode($this->value())); |
|
| 41 | - } |
|
| 33 | + /** |
|
| 34 | + * Get value as a number. |
|
| 35 | + * |
|
| 36 | + * @return BigInt |
|
| 37 | + */ |
|
| 38 | + public function number(): BigInt |
|
| 39 | + { |
|
| 40 | + return BigInt::fromBase256(Base64::urlDecode($this->value())); |
|
| 41 | + } |
|
| 42 | 42 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\Parameter\Feature; |
| 6 | 6 | |