← All changes
|
includes/sdk/google/ramsey/uuid/src/Converter/TimeConverterInterface.php
+16
-21
1.2.7
→
1.4.2
View file →
| @@ -9,46 +9,41 @@ | ||
| 9 | 9 | * @copyright Copyright (c) Ben Ramsey <[email protected]> |
| 10 | 10 | * @license http://opensource.org/licenses/MIT MIT |
| 11 | 11 | */ |
| 12 | 12 | declare (strict_types=1); |
| 13 | -namespace Dudlewebs\WPMCS\Ramsey\Uuid\Converter; | |
| 13 | +namespace Dudlewebs\WPMCS\GCP\Ramsey\Uuid\Converter; | |
| 14 | 14 | |
| 15 | -use Dudlewebs\WPMCS\Ramsey\Uuid\Type\Hexadecimal; | |
| 16 | -use Dudlewebs\WPMCS\Ramsey\Uuid\Type\Time; | |
| 15 | +use Dudlewebs\WPMCS\GCP\Ramsey\Uuid\Type\Hexadecimal; | |
| 16 | +use Dudlewebs\WPMCS\GCP\Ramsey\Uuid\Type\Time; | |
| 17 | 17 | /** |
| 18 | - * A time converter converts timestamps into representations that may be used | |
| 19 | - * in UUIDs | |
| 18 | + * A time converter converts timestamps into representations that may be used in UUIDs | |
| 20 | 19 | * |
| 21 | - * @psalm-immutable | |
| 20 | + * @immutable | |
| 22 | 21 | */ |
| 23 | 22 | interface TimeConverterInterface |
| 24 | 23 | { |
| 25 | 24 | /** |
| 26 | - * Uses the provided seconds and micro-seconds to calculate the count of | |
| 27 | - * 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582, for | |
| 28 | - * RFC 4122 variant UUIDs | |
| 25 | + * Uses the provided seconds and micro-seconds to calculate the count of 100-nanosecond intervals since | |
| 26 | + * UTC 00:00:00.00, 15 October 1582, for RFC 9562 (formerly RFC 4122) variant UUIDs | |
| 29 | 27 | * |
| 30 | - * @link http://tools.ietf.org/html/rfc4122#section-4.2.2 RFC 4122, ยง 4.2.2: Generation Details | |
| 28 | + * @link https://www.rfc-editor.org/rfc/rfc9562#appendix-A RFC 9562, Appendix A. Test Vectors | |
| 31 | 29 | * |
| 32 | - * @param string $seconds A string representation of the number of seconds | |
| 33 | - * since the Unix epoch for the time to calculate | |
| 34 | - * @param string $microseconds A string representation of the micro-seconds | |
| 35 | - * associated with the time to calculate | |
| 30 | + * @param string $seconds A string representation of seconds since the Unix epoch for the time to calculate | |
| 31 | + * @param string $microseconds A string representation of the micro-seconds associated with the time to calculate | |
| 36 | 32 | * |
| 37 | 33 | * @return Hexadecimal The full UUID timestamp as a Hexadecimal value |
| 38 | 34 | * |
| 39 | - * @psalm-pure | |
| 35 | + * @pure | |
| 40 | 36 | */ |
| 41 | - public function calculateTime(string $seconds, string $microseconds): Hexadecimal; | |
| 37 | + public function calculateTime(string $seconds, string $microseconds) : Hexadecimal; | |
| 42 | 38 | /** |
| 43 | 39 | * Converts a timestamp extracted from a UUID to a Unix timestamp |
| 44 | 40 | * |
| 45 | - * @param Hexadecimal $uuidTimestamp A hexadecimal representation of a UUID | |
| 46 | - * timestamp; a UUID timestamp is a count of 100-nanosecond intervals | |
| 47 | - * since UTC 00:00:00.00, 15 October 1582. | |
| 41 | + * @param Hexadecimal $uuidTimestamp A hexadecimal representation of a UUID timestamp; a UUID timestamp is a count | |
| 42 | + * of 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582. | |
| 48 | 43 | * |
| 49 | 44 | * @return Time An instance of {@see Time} |
| 50 | 45 | * |
| 51 | - * @psalm-pure | |
| 46 | + * @pure | |
| 52 | 47 | */ |
| 53 | - public function convertTime(Hexadecimal $uuidTimestamp): Time; | |
| 48 | + public function convertTime(Hexadecimal $uuidTimestamp) : Time; | |
| 54 | 49 | } |