annotationsReader = $annotationsReader; } /** * @param \ReflectionProperty $reflectionProperty * @param Items|Schema $property */ public function updateWithSwaggerPropertyAnnotation(\ReflectionProperty $reflectionProperty, $property) { $swgProperty = $this->annotationsReader->getPropertyAnnotation($reflectionProperty, SwgProperty::class); if ($swgProperty instanceof SwgProperty) { if ($swgProperty->description !== null) { $property->setDescription($swgProperty->description); } if ($swgProperty->type !== null) { $property->setType($swgProperty->type); } if ($swgProperty->readOnly !== null) { $property->setReadOnly($swgProperty->readOnly); } if ($swgProperty->title !== null) { $property->setTitle($swgProperty->title); } if ($swgProperty->example !== null) { $property->setExample((string) $swgProperty->example); } } } }