Skip to content

Commit

Permalink
support php84 (and fix deprecations)
Browse files Browse the repository at this point in the history
  • Loading branch information
champix committed Jan 18, 2025
1 parent e7b2492 commit 9202b5c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/Coduo/PHPHumanizer/Collection/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(TranslatorInterface $translator, string $catalogue =
*
* @param array<string> $collection
*/
public function format(array $collection, int $limit = null) : string
public function format(array $collection, ?int $limit = null) : string
{
$count = \count($collection);

Expand Down
2 changes: 1 addition & 1 deletion src/Coduo/PHPHumanizer/Collection/Oxford.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(Formatter $formatter)
/**
* @param array<string> $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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Coduo/PHPHumanizer/CollectionHumanizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class CollectionHumanizer
/**
* @param array<string> $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))
Expand Down
2 changes: 1 addition & 1 deletion src/Coduo/PHPHumanizer/String/BinarySuffix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
Expand Down

0 comments on commit 9202b5c

Please sign in to comment.