Skip to content

Commit

Permalink
Implement recommendations from the PR-review
Browse files Browse the repository at this point in the history
  • Loading branch information
heiglandreas committed Nov 7, 2024
1 parent a04bce4 commit 4e3fae1
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/ModelDescriber/Annotations/ReflectionReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit 4e3fae1

Please sign in to comment.