Skip to content

Commit

Permalink
run cs fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi committed Jun 1, 2024
1 parent 60309e7 commit 353477e
Show file tree
Hide file tree
Showing 66 changed files with 207 additions and 75 deletions.
4 changes: 3 additions & 1 deletion src/Base64/Base64Parser.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Base64;

Expand Down
4 changes: 3 additions & 1 deletion src/Base64/SafeBase64Parser.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Base64;

Expand Down
5 changes: 4 additions & 1 deletion src/Cryptography/Algorithms/Ecdsa/AbstractEcdsaSigner.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Ecdsa;

use MiladRahimi\Jwt\Cryptography\Keys\EcdsaPrivateKey;
use MiladRahimi\Jwt\Cryptography\Signer;
use MiladRahimi\Jwt\Exceptions\SigningException;

use function ltrim;
use function ord;
use function str_pad;
Expand Down
5 changes: 4 additions & 1 deletion src/Cryptography/Algorithms/Ecdsa/AbstractEcdsaVerifier.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Ecdsa;

use MiladRahimi\Jwt\Cryptography\Keys\EcdsaPublicKey;
use MiladRahimi\Jwt\Cryptography\Verifier;
use MiladRahimi\Jwt\Exceptions\InvalidSignatureException;

use function chr;
use function ltrim;
use function ord;
Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Ecdsa/Algorithm.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Ecdsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Ecdsa/ES256KVerifier.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Ecdsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Ecdsa/ES256Signer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Ecdsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Ecdsa/ES256Verifier.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Ecdsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Ecdsa/ES384Signer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Ecdsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Ecdsa/ES384Verifier.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Ecdsa;

Expand Down
5 changes: 4 additions & 1 deletion src/Cryptography/Algorithms/Eddsa/EdDsaSigner.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Eddsa;

Expand All @@ -7,6 +9,7 @@
use MiladRahimi\Jwt\Exceptions\SigningException;
use RuntimeException;
use SodiumException;

use function function_exists;

class EdDsaSigner implements Signer
Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Eddsa/EdDsaVerifier.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Eddsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Hmac/AbstractHmac.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Hmac;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Hmac/HS256.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Hmac;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Hmac/HS384.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Hmac;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Hmac/HS512.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Hmac;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Rsa/AbstractRsaSigner.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Rsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Rsa/AbstractRsaVerifier.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Rsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Rsa/Algorithm.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Rsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Rsa/RS256Signer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Rsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Rsa/RS256Verifier.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Rsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Rsa/RS384Signer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Rsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Rsa/RS384Verifier.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Rsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Rsa/RS512Signer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Rsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Algorithms/Rsa/RS512Verifier.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Algorithms\Rsa;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Keys/EcdsaPrivateKey.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Keys;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Keys/EcdsaPublicKey.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Keys;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Keys/EdDsaPrivateKey.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Keys;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Keys/EdDsaPublicKey.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Keys;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Keys/HmacKey.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Keys;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Keys/RsaPrivateKey.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Keys;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Keys/RsaPublicKey.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography\Keys;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Signer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography;

Expand Down
4 changes: 3 additions & 1 deletion src/Cryptography/Verifier.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Cryptography;

Expand Down
18 changes: 10 additions & 8 deletions src/Enums/PublicClaimNames.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Enums;

Expand All @@ -9,11 +11,11 @@
*/
class PublicClaimNames
{
const ISSUER = 'iss';
const SUBJECT = 'sub';
const AUDIENCE = 'aud';
const EXPIRATION_TIME = 'exp';
const NOT_BEFORE = 'nbf';
const ISSUED_AT = 'iat';
const JTI = 'jti';
public const ISSUER = 'iss';
public const SUBJECT = 'sub';
public const AUDIENCE = 'aud';
public const EXPIRATION_TIME = 'exp';
public const NOT_BEFORE = 'nbf';
public const ISSUED_AT = 'iat';
public const JTI = 'jti';
}
4 changes: 3 additions & 1 deletion src/Exceptions/InvalidKeyException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Exceptions;

Expand Down
4 changes: 3 additions & 1 deletion src/Exceptions/InvalidSignatureException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Exceptions;

Expand Down
4 changes: 3 additions & 1 deletion src/Exceptions/InvalidTokenException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Exceptions;

Expand Down
4 changes: 3 additions & 1 deletion src/Exceptions/JsonDecodingException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Exceptions;

Expand Down
4 changes: 3 additions & 1 deletion src/Exceptions/JsonEncodingException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Exceptions;

Expand Down
4 changes: 3 additions & 1 deletion src/Exceptions/NoKidException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Exceptions;

Expand Down
4 changes: 3 additions & 1 deletion src/Exceptions/SigningException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Exceptions;

Expand Down
4 changes: 3 additions & 1 deletion src/Exceptions/ValidationException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Exceptions;

Expand Down
4 changes: 3 additions & 1 deletion src/Exceptions/VerifierNotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace MiladRahimi\Jwt\Exceptions;

Expand Down
Loading

0 comments on commit 353477e

Please sign in to comment.