diff --git a/composer.json b/composer.json index 62ccdd3..a5e5989 100644 --- a/composer.json +++ b/composer.json @@ -46,13 +46,13 @@ "php" : "^8.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.53.0", - "phpstan/phpstan": "^1.10.66", - "phpstan/phpstan-deprecation-rules": "^1.1.4", - "phpstan/phpstan-phpunit": "^1.3.16", - "phpstan/phpstan-strict-rules": "^1.5.3", - "phpunit/phpunit": "^10.5.15 || ^11.1.1", - "symfony/var-dumper": "^6.4.6" + "friendsofphp/php-cs-fixer": "^3.64.0", + "phpstan/phpstan": "^1.12.3", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan-strict-rules": "^1.6.0", + "phpunit/phpunit": "^10.5.15 || ^11.3.4", + "symfony/var-dumper": "^6.4.11" }, "autoload": { "psr-4": { diff --git a/src/Duration.php b/src/Duration.php index 743b9c0..a8015cb 100644 --- a/src/Duration.php +++ b/src/Duration.php @@ -137,7 +137,7 @@ public static function fromChronoString(string $duration): self 'minute' => $matches['minute'], 'second' => $matches['second'], 'fraction' => $matches['fraction'] ?? null, - 'sign' => $matches['sign'] ?? null, + 'sign' => $matches['sign'], ]); } @@ -153,11 +153,11 @@ public static function fromTimeString(string $duration): self } return self::fromUnits([ - 'hour' => $matches['hour'] ?? null, - 'minute' => $matches['minute'] ?? null, + 'hour' => $matches['hour'], + 'minute' => $matches['minute'], 'second' => $matches['second'] ?? '0', 'fraction' => $matches['fraction'] ?? null, - 'sign' => $matches['sign'] ?? null, + 'sign' => $matches['sign'], ]); }