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:
Ben Ramsey
2020-02-21 11:59:49 -06:00
parent 303b973c5c
commit f42afcecbb
22 changed files with 109 additions and 100 deletions
@@ -16,7 +16,7 @@ namespace Ramsey\Uuid\Provider\Dce;
use Ramsey\Uuid\Exception\DceSecurityException;
use Ramsey\Uuid\Provider\DceSecurityProviderInterface;
use Ramsey\Uuid\Type\IntegerValue;
use Ramsey\Uuid\Type\Integer as IntegerObject;
use function escapeshellarg;
use function preg_split;
@@ -40,11 +40,11 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface
*
* @inheritDoc
*/
public function getUid(): IntegerValue
public function getUid(): IntegerObject
{
static $uid = null;
if ($uid instanceof IntegerValue) {
if ($uid instanceof IntegerObject) {
return $uid;
}
@@ -60,7 +60,7 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface
);
}
$uid = new IntegerValue($uid);
$uid = new IntegerObject($uid);
return $uid;
}
@@ -70,11 +70,11 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface
*
* @inheritDoc
*/
public function getGid(): IntegerValue
public function getGid(): IntegerObject
{
static $gid = null;
if ($gid instanceof IntegerValue) {
if ($gid instanceof IntegerObject) {
return $gid;
}
@@ -90,7 +90,7 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface
);
}
$gid = new IntegerValue($gid);
$gid = new IntegerObject($gid);
return $gid;
}