mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-16 16:17:43 +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:
@@ -7,7 +7,7 @@ namespace Ramsey\Uuid\Test\Provider\Dce;
|
||||
use Ramsey\Uuid\Exception\DceSecurityException;
|
||||
use Ramsey\Uuid\Provider\Dce\SystemDceSecurityProvider;
|
||||
use Ramsey\Uuid\Test\TestCase;
|
||||
use Ramsey\Uuid\Type\IntegerValue;
|
||||
use Ramsey\Uuid\Type\Integer as IntegerObject;
|
||||
use phpmock\mockery\PHPMockery;
|
||||
|
||||
use function array_merge;
|
||||
@@ -146,7 +146,7 @@ class SystemDceSecurityProviderTest extends TestCase
|
||||
|
||||
$uid = $provider->getUid();
|
||||
|
||||
$this->assertInstanceOf(IntegerValue::class, $uid);
|
||||
$this->assertInstanceOf(IntegerObject::class, $uid);
|
||||
$this->assertSame($expectedId, $uid->toString());
|
||||
$this->assertSame($uid, $provider->getUid());
|
||||
}
|
||||
@@ -198,7 +198,7 @@ class SystemDceSecurityProviderTest extends TestCase
|
||||
|
||||
$uid = $provider->getUid();
|
||||
|
||||
$this->assertInstanceOf(IntegerValue::class, $uid);
|
||||
$this->assertInstanceOf(IntegerObject::class, $uid);
|
||||
$this->assertSame($id, $uid->toString());
|
||||
$this->assertSame($uid, $provider->getUid());
|
||||
}
|
||||
@@ -297,7 +297,7 @@ class SystemDceSecurityProviderTest extends TestCase
|
||||
|
||||
$gid = $provider->getGid();
|
||||
|
||||
$this->assertInstanceOf(IntegerValue::class, $gid);
|
||||
$this->assertInstanceOf(IntegerObject::class, $gid);
|
||||
$this->assertSame($id, $gid->toString());
|
||||
$this->assertSame($gid, $provider->getGid());
|
||||
}
|
||||
@@ -418,7 +418,7 @@ class SystemDceSecurityProviderTest extends TestCase
|
||||
|
||||
$gid = $provider->getGid();
|
||||
|
||||
$this->assertInstanceOf(IntegerValue::class, $gid);
|
||||
$this->assertInstanceOf(IntegerObject::class, $gid);
|
||||
$this->assertSame($expectedId, $gid->toString());
|
||||
$this->assertSame($gid, $provider->getGid());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user