diff --git a/composer.json b/composer.json index 69d31c5..7feb697 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "homepage": "https://php-collective.github.io/dto/", "require": { "php": "^8.2", - "sebastian/diff": "^6.0 || ^7.0 || ^8.0", + "sebastian/diff": "^6.0 || ^7.0 || ^8.0 || ^9.0", "twig/twig": "^3.0" }, "require-dev": { diff --git a/src/Config/FieldBuilder.php b/src/Config/FieldBuilder.php index 1d15b8b..5c20945 100644 --- a/src/Config/FieldBuilder.php +++ b/src/Config/FieldBuilder.php @@ -358,7 +358,7 @@ public function maxLength(int $length): static /** * Set minimum numeric value validation. */ - public function min(int|float $value): static + public function min(float|int $value): static { $this->min = $value; @@ -368,7 +368,7 @@ public function min(int|float $value): static /** * Set maximum numeric value validation. */ - public function max(int|float $value): static + public function max(float|int $value): static { $this->max = $value; diff --git a/src/Generator/Builder.php b/src/Generator/Builder.php index adfcaf3..33659bd 100644 --- a/src/Generator/Builder.php +++ b/src/Generator/Builder.php @@ -382,7 +382,7 @@ protected function finder(): FinderInterface * * @return array */ - protected function normalizeTraits(string|array|null $traits): array + protected function normalizeTraits(array|string|null $traits): array { if ($traits === null || $traits === '' || $traits === []) { return []; diff --git a/src/Generator/Generator.php b/src/Generator/Generator.php index 5b4b101..8f4d787 100644 --- a/src/Generator/Generator.php +++ b/src/Generator/Generator.php @@ -84,7 +84,6 @@ public function generate(string $configPath, string $srcPath, array $options = [ // Output any warnings from field validation foreach ($this->builder->getWarnings() as $warning) { - /** @phpstan-ignore function.alreadyNarrowedType (runtime check for custom IoInterface implementations) */ if (method_exists($this->io, 'warning')) { $this->io->warning($warning); }