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:
+8
-6
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user