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
+8 -6
View File
@@ -14,6 +14,8 @@ declare(strict_types=1);
namespace Ramsey\Uuid\Type;
use Ramsey\Uuid\Type\Integer as IntegerObject;
/**
* A value object representing a timestamp
*
@@ -26,12 +28,12 @@ namespace Ramsey\Uuid\Type;
final class Time
{
/**
* @var IntegerValue
* @var IntegerObject
*/
private $seconds;
/**
* @var IntegerValue
* @var IntegerObject
*/
private $microSeconds;
@@ -41,16 +43,16 @@ final class Time
*/
public function __construct($seconds, $microSeconds = 0)
{
$this->seconds = new IntegerValue($seconds);
$this->microSeconds = new IntegerValue($microSeconds);
$this->seconds = new IntegerObject($seconds);
$this->microSeconds = new IntegerObject($microSeconds);
}
public function getSeconds(): IntegerValue
public function getSeconds(): IntegerObject
{
return $this->seconds;
}
public function getMicroSeconds(): IntegerValue
public function getMicroSeconds(): IntegerObject
{
return $this->microSeconds;
}