From 5709672a7be08c9c5c0d23b1d414c7295856b5e0 Mon Sep 17 00:00:00 2001 From: pkly Date: Tue, 5 Mar 2024 11:29:15 +0100 Subject: [PATCH] QC fix --- src/Service/Nelmio/DtoOADescriber.php | 2 +- src/Service/Type/Coercer/StringCoercer.php | 1 + tests/Unit/Dto/ValidationContext/DtoWithChildrenContextTest.php | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Service/Nelmio/DtoOADescriber.php b/src/Service/Nelmio/DtoOADescriber.php index dfc7637..0a260db 100644 --- a/src/Service/Nelmio/DtoOADescriber.php +++ b/src/Service/Nelmio/DtoOADescriber.php @@ -117,7 +117,7 @@ private function describeDTO( $name = explode('.', $key)[0]; $operation->parameters[] = new Parameter([ - 'name' => $name.($type === 'query' && $model->isCollection() ? '[]' : ''), // if we're in the query bag automatically add [] to param name + 'name' => $name.('query' === $type && $model->isCollection() ? '[]' : ''), // if we're in the query bag automatically add [] to param name 'in' => self::OA_BAG_MAP[$type] ?? $type, 'schema' => $schema, 'description' => $model->getDescription() ?? $this->getUndefined(), diff --git a/src/Service/Type/Coercer/StringCoercer.php b/src/Service/Type/Coercer/StringCoercer.php index 5709b86..718852c 100644 --- a/src/Service/Type/Coercer/StringCoercer.php +++ b/src/Service/Type/Coercer/StringCoercer.php @@ -37,6 +37,7 @@ public function coerce( mixed $value, bool $validatePropertyConstraints = false ): CoerceResult { + /** @phpstan-ignore-next-line */ return $this->buildResult( $this->validator, $propertyPath, diff --git a/tests/Unit/Dto/ValidationContext/DtoWithChildrenContextTest.php b/tests/Unit/Dto/ValidationContext/DtoWithChildrenContextTest.php index 3fd191b..fc1662e 100644 --- a/tests/Unit/Dto/ValidationContext/DtoWithChildrenContextTest.php +++ b/tests/Unit/Dto/ValidationContext/DtoWithChildrenContextTest.php @@ -7,7 +7,6 @@ use DualMedia\DtoRequestBundle\Tests\PHPUnit\KernelTestCase; use DualMedia\DtoRequestBundle\Tests\Traits\Unit\ConstraintValidationTrait; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Validator\ConstraintViolationInterface; /** * @group new-validation