Skip to content

Commit

Permalink
refactor: switch to PSR-20
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsey committed Nov 25, 2022
1 parent 993f0e3 commit e53b0ea
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -23,7 +23,7 @@
"php-64bit": "^8.2",
"brick/math": "^0.10.2",
"identifier/identifier": "dev-main",
"stella-maris/clock": "^0.1.6"
"psr/clock": "^1.0"
},
"require-dev": {
"captainhook/captainhook": "^5.10",
Expand Down
2 changes: 1 addition & 1 deletion src/Service/BytesGenerator/MonotonicBytesGenerator.php
Expand Up @@ -17,8 +17,8 @@
namespace Ramsey\Identifier\Service\BytesGenerator;

use DateTimeInterface;
use Psr\Clock\ClockInterface as Clock;
use Ramsey\Identifier\Service\Clock\SystemClock;
use StellaMaris\Clock\ClockInterface as Clock;

use function assert;
use function hash;
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Clock/FrozenClock.php
Expand Up @@ -17,7 +17,7 @@
namespace Ramsey\Identifier\Service\Clock;

use DateTimeImmutable;
use StellaMaris\Clock\ClockInterface as Clock;
use Psr\Clock\ClockInterface as Clock;

/**
* A clock that always returns a pre-defined date-time
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Clock/SystemClock.php
Expand Up @@ -17,7 +17,7 @@
namespace Ramsey\Identifier\Service\Clock;

use DateTimeImmutable;
use StellaMaris\Clock\ClockInterface as Clock;
use Psr\Clock\ClockInterface as Clock;

/**
* A clock that always returns the current system time
Expand Down
2 changes: 1 addition & 1 deletion src/Snowflake/DiscordSnowflakeFactory.php
Expand Up @@ -22,12 +22,12 @@
use Identifier\DateTimeIdentifierFactory;
use Identifier\IntegerIdentifierFactory;
use Identifier\StringIdentifierFactory;
use Psr\Clock\ClockInterface as Clock;
use Ramsey\Identifier\Exception\InvalidArgument;
use Ramsey\Identifier\Service\Clock\Sequence;
use Ramsey\Identifier\Service\Clock\StatefulSequence;
use Ramsey\Identifier\Service\Clock\SystemClock;
use Ramsey\Identifier\Snowflake\Utility\StandardFactory;
use StellaMaris\Clock\ClockInterface as Clock;

/**
* A factory that generates Snowflakes according to Discord's rules
Expand Down
2 changes: 1 addition & 1 deletion src/Snowflake/GenericSnowflakeFactory.php
Expand Up @@ -23,13 +23,13 @@
use Identifier\DateTimeIdentifierFactory;
use Identifier\IntegerIdentifierFactory;
use Identifier\StringIdentifierFactory;
use Psr\Clock\ClockInterface as Clock;
use Ramsey\Identifier\Exception\InvalidArgument;
use Ramsey\Identifier\Service\Clock\Sequence;
use Ramsey\Identifier\Service\Clock\StatefulSequence;
use Ramsey\Identifier\Service\Clock\SystemClock;
use Ramsey\Identifier\Snowflake;
use Ramsey\Identifier\Snowflake\Utility\StandardFactory;
use StellaMaris\Clock\ClockInterface as Clock;

use function sprintf;
use function substr;
Expand Down
2 changes: 1 addition & 1 deletion src/Snowflake/InstagramSnowflakeFactory.php
Expand Up @@ -22,12 +22,12 @@
use Identifier\DateTimeIdentifierFactory;
use Identifier\IntegerIdentifierFactory;
use Identifier\StringIdentifierFactory;
use Psr\Clock\ClockInterface as Clock;
use Ramsey\Identifier\Exception\InvalidArgument;
use Ramsey\Identifier\Service\Clock\Sequence;
use Ramsey\Identifier\Service\Clock\StatefulSequence;
use Ramsey\Identifier\Service\Clock\SystemClock;
use Ramsey\Identifier\Snowflake\Utility\StandardFactory;
use StellaMaris\Clock\ClockInterface as Clock;

/**
* A factory that generates Snowflakes according to Instagram's rules
Expand Down
2 changes: 1 addition & 1 deletion src/Snowflake/TwitterSnowflakeFactory.php
Expand Up @@ -22,12 +22,12 @@
use Identifier\DateTimeIdentifierFactory;
use Identifier\IntegerIdentifierFactory;
use Identifier\StringIdentifierFactory;
use Psr\Clock\ClockInterface as Clock;
use Ramsey\Identifier\Exception\InvalidArgument;
use Ramsey\Identifier\Service\Clock\Sequence;
use Ramsey\Identifier\Service\Clock\StatefulSequence;
use Ramsey\Identifier\Service\Clock\SystemClock;
use Ramsey\Identifier\Snowflake\Utility\StandardFactory;
use StellaMaris\Clock\ClockInterface as Clock;

/**
* A factory that generates Snowflakes according to Twitter's rules
Expand Down
2 changes: 1 addition & 1 deletion src/Uuid/UuidV1Factory.php
Expand Up @@ -21,6 +21,7 @@
use Identifier\DateTimeIdentifierFactory;
use Identifier\IntegerIdentifierFactory;
use Identifier\StringIdentifierFactory;
use Psr\Clock\ClockInterface as Clock;
use Ramsey\Identifier\Exception\InvalidArgument;
use Ramsey\Identifier\Service\Clock\Sequence;
use Ramsey\Identifier\Service\Clock\StatefulSequence;
Expand All @@ -31,7 +32,6 @@
use Ramsey\Identifier\Uuid\Utility\Binary;
use Ramsey\Identifier\Uuid\Utility\StandardFactory;
use Ramsey\Identifier\Uuid\Utility\Time;
use StellaMaris\Clock\ClockInterface as Clock;

use function hex2bin;
use function pack;
Expand Down
2 changes: 1 addition & 1 deletion src/Uuid/UuidV2Factory.php
Expand Up @@ -21,6 +21,7 @@
use Identifier\DateTimeIdentifierFactory;
use Identifier\IntegerIdentifierFactory;
use Identifier\StringIdentifierFactory;
use Psr\Clock\ClockInterface as Clock;
use Ramsey\Identifier\Exception\DceIdentifierNotFound;
use Ramsey\Identifier\Exception\InvalidArgument;
use Ramsey\Identifier\Service\Clock\Sequence;
Expand All @@ -34,7 +35,6 @@
use Ramsey\Identifier\Uuid\Utility\Binary;
use Ramsey\Identifier\Uuid\Utility\StandardFactory;
use Ramsey\Identifier\Uuid\Utility\Time;
use StellaMaris\Clock\ClockInterface as Clock;

use function hex2bin;
use function pack;
Expand Down
2 changes: 1 addition & 1 deletion src/Uuid/UuidV6Factory.php
Expand Up @@ -21,6 +21,7 @@
use Identifier\DateTimeIdentifierFactory;
use Identifier\IntegerIdentifierFactory;
use Identifier\StringIdentifierFactory;
use Psr\Clock\ClockInterface as Clock;
use Ramsey\Identifier\Exception\InvalidArgument;
use Ramsey\Identifier\Service\Clock\Sequence;
use Ramsey\Identifier\Service\Clock\StatefulSequence;
Expand All @@ -31,7 +32,6 @@
use Ramsey\Identifier\Uuid\Utility\Binary;
use Ramsey\Identifier\Uuid\Utility\StandardFactory;
use Ramsey\Identifier\Uuid\Utility\Time;
use StellaMaris\Clock\ClockInterface as Clock;

use function bin2hex;
use function hex2bin;
Expand Down

0 comments on commit e53b0ea

Please sign in to comment.