Skip to content

Commit

Permalink
More boyscouting
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Apr 30, 2022
1 parent 00badc2 commit aa0be9b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
SymmetricKey
};
use ParagonIE\ConstantTime\Binary;
use ParagonIE\Paseto\Parsing\NonExpiringSupport;
use ParagonIE\Paseto\Parsing\PasetoMessage;
use ParagonIE\Paseto\Parsing\{
NonExpiringSupport,
PasetoMessage
};
use ParagonIE\Paseto\Rules\NotExpired;
use ParagonIE\Paseto\Traits\RegisteredClaims;
use function get_class,
Expand Down
4 changes: 2 additions & 2 deletions src/Purpose.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ final class Purpose
*
* @var array<string, string>
*/
private static $sendingKeyToPurpose;
private static $sendingKeyToPurpose = [];

/**
* Inverse of EXPECTED_RECEIVING_KEYS, evaluated and statically cached at
* runtime.
*
* @var array<string, string>
*/
private static $receivingKeyToPurpose;
private static $receivingKeyToPurpose = [];

/**
* @var string
Expand Down
6 changes: 4 additions & 2 deletions src/ReceivingKeyRing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
declare(strict_types=1);
namespace ParagonIE\Paseto;

use ParagonIE\Paseto\Exception\InvalidKeyException;
use ParagonIE\Paseto\Exception\PasetoException;
use ParagonIE\Paseto\Exception\{
InvalidKeyException,
PasetoException
};
use ParagonIE\Paseto\Traits\MultiKeyTrait;

class ReceivingKeyRing implements KeyRingInterface, ReceivingKey
Expand Down
12 changes: 8 additions & 4 deletions src/SendingKeyRing.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
namespace ParagonIE\Paseto;

use Exception;
use ParagonIE\Paseto\Exception\InvalidKeyException;
use ParagonIE\Paseto\Exception\PasetoException;
use ParagonIE\Paseto\Keys\AsymmetricSecretKey;
use ParagonIE\Paseto\Keys\SymmetricKey;
use ParagonIE\Paseto\Exception\{
InvalidKeyException,
PasetoException
};
use ParagonIE\Paseto\Keys\{
AsymmetricSecretKey,
SymmetricKey
};
use ParagonIE\Paseto\Traits\MultiKeyTrait;

class SendingKeyRing implements KeyRingInterface, SendingKey
Expand Down

0 comments on commit aa0be9b

Please sign in to comment.