mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Rename Type\IntegerValue to Type\Integer
Rename `Type\IntegerValue` to `Type\Integer`. It was originally named `IntegerValue` because static analysis sees `Integer` in docblock annotations and treats it as the native `int` type. `Integer` is not a reserved word in PHP, so it should be named `Integer` for consistency with other types in this library. When using it, a class alias prevents static analysis from complaining.
This commit is contained in:
@@ -18,7 +18,7 @@ use Ramsey\Uuid\Provider\NodeProviderInterface;
|
||||
use Ramsey\Uuid\Provider\Time\FixedTimeProvider;
|
||||
use Ramsey\Uuid\Test\TestCase;
|
||||
use Ramsey\Uuid\Type\Hexadecimal;
|
||||
use Ramsey\Uuid\Type\IntegerValue;
|
||||
use Ramsey\Uuid\Type\Integer as IntegerObject;
|
||||
use Ramsey\Uuid\Type\Time;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
|
||||
@@ -42,7 +42,7 @@ class DceSecurityGeneratorTest extends TestCase
|
||||
$seconds,
|
||||
$microseconds,
|
||||
int $providedDomain,
|
||||
?IntegerValue $providedId,
|
||||
?IntegerObject $providedId,
|
||||
?Hexadecimal $providedNode,
|
||||
?int $providedClockSeq,
|
||||
string $expectedId,
|
||||
@@ -51,8 +51,8 @@ class DceSecurityGeneratorTest extends TestCase
|
||||
string $expectedTimeMidHi
|
||||
): void {
|
||||
$dceSecurityProvider = Mockery::mock(DceSecurityProviderInterface::class, [
|
||||
'getUid' => new IntegerValue($uid),
|
||||
'getGid' => new IntegerValue($gid),
|
||||
'getUid' => new IntegerObject($uid),
|
||||
'getGid' => new IntegerObject($gid),
|
||||
]);
|
||||
|
||||
$nodeProvider = Mockery::mock(NodeProviderInterface::class, [
|
||||
@@ -119,7 +119,7 @@ class DceSecurityGeneratorTest extends TestCase
|
||||
'seconds' => 1579132397,
|
||||
'microseconds' => 500000,
|
||||
'providedDomain' => Uuid::DCE_DOMAIN_ORG,
|
||||
'providedId' => new IntegerValue('4294967295'),
|
||||
'providedId' => new IntegerObject('4294967295'),
|
||||
'providedNode' => null,
|
||||
'providedClockSeq' => null,
|
||||
'expectedId' => 'ffffffff',
|
||||
|
||||
Reference in New Issue
Block a user