Aggiornato Composer
This commit is contained in:
@@ -27,10 +27,7 @@ use Ramsey\Uuid\Math\BrickMathCalculator;
|
||||
*/
|
||||
class BigNumberConverter implements NumberConverterInterface
|
||||
{
|
||||
/**
|
||||
* @var NumberConverterInterface
|
||||
*/
|
||||
private $converter;
|
||||
private NumberConverterInterface $converter;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -26,14 +26,8 @@ use Ramsey\Uuid\Type\Integer as IntegerObject;
|
||||
*/
|
||||
class GenericNumberConverter implements NumberConverterInterface
|
||||
{
|
||||
/**
|
||||
* @var CalculatorInterface
|
||||
*/
|
||||
private $calculator;
|
||||
|
||||
public function __construct(CalculatorInterface $calculator)
|
||||
public function __construct(private CalculatorInterface $calculator)
|
||||
{
|
||||
$this->calculator = $calculator;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,10 +29,7 @@ use Ramsey\Uuid\Type\Time;
|
||||
*/
|
||||
class BigNumberTimeConverter implements TimeConverterInterface
|
||||
{
|
||||
/**
|
||||
* @var TimeConverterInterface
|
||||
*/
|
||||
private $converter;
|
||||
private TimeConverterInterface $converter;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -50,14 +50,8 @@ class GenericTimeConverter implements TimeConverterInterface
|
||||
*/
|
||||
private const MICROSECOND_INTERVALS = '10';
|
||||
|
||||
/**
|
||||
* @var CalculatorInterface
|
||||
*/
|
||||
private $calculator;
|
||||
|
||||
public function __construct(CalculatorInterface $calculator)
|
||||
public function __construct(private CalculatorInterface $calculator)
|
||||
{
|
||||
$this->calculator = $calculator;
|
||||
}
|
||||
|
||||
public function calculateTime(string $seconds, string $microseconds): Hexadecimal
|
||||
|
||||
@@ -58,20 +58,9 @@ class PhpTimeConverter implements TimeConverterInterface
|
||||
*/
|
||||
private const MICROSECOND_INTERVALS = 10;
|
||||
|
||||
/**
|
||||
* @var CalculatorInterface
|
||||
*/
|
||||
private $calculator;
|
||||
|
||||
/**
|
||||
* @var TimeConverterInterface
|
||||
*/
|
||||
private $fallbackConverter;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $phpPrecision;
|
||||
private int $phpPrecision;
|
||||
private CalculatorInterface $calculator;
|
||||
private TimeConverterInterface $fallbackConverter;
|
||||
|
||||
public function __construct(
|
||||
?CalculatorInterface $calculator = null,
|
||||
@@ -132,11 +121,11 @@ class PhpTimeConverter implements TimeConverterInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int|float $time The time to split into seconds and microseconds
|
||||
* @param float|int $time The time to split into seconds and microseconds
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
private function splitTime($time): array
|
||||
private function splitTime(float | int $time): array
|
||||
{
|
||||
$split = explode('.', (string) $time, 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user