diff --git a/composer.json b/composer.json index 138d0f5..4a5699d 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": "~8.1 || ~8.2 || ~8.3", + "php": "~8.1 || ~8.2 || ~8.3 || ~8.4", "symfony/translation": "~5.4||~6.4||~7", "symfony/yaml": "~5.4||~6.4||~7", "aeon-php/calendar": "^1.0" diff --git a/src/Coduo/PHPHumanizer/Collection/Formatter.php b/src/Coduo/PHPHumanizer/Collection/Formatter.php index 79d8eac..57c62e8 100644 --- a/src/Coduo/PHPHumanizer/Collection/Formatter.php +++ b/src/Coduo/PHPHumanizer/Collection/Formatter.php @@ -30,7 +30,7 @@ public function __construct(TranslatorInterface $translator, string $catalogue = * * @param array $collection */ - public function format(array $collection, int $limit = null) : string + public function format(array $collection, ?int $limit = null) : string { $count = \count($collection); diff --git a/src/Coduo/PHPHumanizer/Collection/Oxford.php b/src/Coduo/PHPHumanizer/Collection/Oxford.php index 2ec61ef..932a297 100644 --- a/src/Coduo/PHPHumanizer/Collection/Oxford.php +++ b/src/Coduo/PHPHumanizer/Collection/Oxford.php @@ -23,7 +23,7 @@ public function __construct(Formatter $formatter) /** * @param array $collection */ - public function format(array $collection, int $limit = null) : string + public function format(array $collection, ?int $limit = null) : string { return $this->formatter->format($collection, $limit); } diff --git a/src/Coduo/PHPHumanizer/CollectionHumanizer.php b/src/Coduo/PHPHumanizer/CollectionHumanizer.php index dc83f80..7077348 100644 --- a/src/Coduo/PHPHumanizer/CollectionHumanizer.php +++ b/src/Coduo/PHPHumanizer/CollectionHumanizer.php @@ -20,7 +20,7 @@ final class CollectionHumanizer /** * @param array $collection */ - public static function oxford(array $collection, int $limit = null, string $locale = 'en') : string + public static function oxford(array $collection, ?int $limit = null, string $locale = 'en') : string { $oxford = new Oxford( new Formatter(Builder::build($locale)) diff --git a/src/Coduo/PHPHumanizer/String/BinarySuffix.php b/src/Coduo/PHPHumanizer/String/BinarySuffix.php index 9332d4a..a522482 100644 --- a/src/Coduo/PHPHumanizer/String/BinarySuffix.php +++ b/src/Coduo/PHPHumanizer/String/BinarySuffix.php @@ -34,7 +34,7 @@ final class BinarySuffix 0 => '# bytes', ]; - public function __construct(int $number, string $locale = 'en', int $precision = null) + public function __construct(int $number, string $locale = 'en', ?int $precision = null) { if (!\class_exists(\NumberFormatter::class)) { throw new \RuntimeException('Binary suffix converter requires intl extension!');