From 6a2bffd3b1c8c5aeb40e68a41bf06096e88f55fc Mon Sep 17 00:00:00 2001 From: Andreas Heigl Date: Thu, 7 Nov 2024 09:50:22 +0100 Subject: [PATCH] Implement recommendations from the PR-review --- src/ModelDescriber/Annotations/ReflectionReader.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/ModelDescriber/Annotations/ReflectionReader.php b/src/ModelDescriber/Annotations/ReflectionReader.php index c6df8fa94..4ea3f26f9 100644 --- a/src/ModelDescriber/Annotations/ReflectionReader.php +++ b/src/ModelDescriber/Annotations/ReflectionReader.php @@ -18,30 +18,25 @@ /** * Read default values of a property from the function or property signature. * - * This needs to be called before the SymfonyConstraintAnnotationReader, + * This needs to be called before the {@see SymfonyConstraintAnnotationReader}, * otherwise required properties might be considered wrongly. * * @internal */ -class ReflectionReader +final class ReflectionReader { use SetsContextTrait; - /** - * @var OA\Schema - */ - private $schema; + private ?OA\Schema $schema; /** * Update the given property and schema with defined Symfony constraints. * * @param \ReflectionProperty|\ReflectionMethod $reflection - * @param string[]|null $validationGroups */ public function updateProperty( $reflection, - OA\Property $property, - ?array $validationGroups = null + OA\Property $property ): void { // The default has been set by an Annotation or Attribute // We leave that as it is!