Fix @var phpdoc

This commit is contained in:
Fabien Potencier
2025-07-12 11:35:41 +02:00
parent 7a4bc0e606
commit 9c17469c6f
7 changed files with 8 additions and 8 deletions

View File

@@ -42,7 +42,7 @@ class FormValidator extends ConstraintValidator
return;
}
/* @var FormInterface $form */
/** @var FormInterface $form */
$config = $form->getConfig();
$validator = $this->context->getValidator()->inContext($this->context);

View File

@@ -43,7 +43,7 @@ class ValidatorExtension extends AbstractExtension
// the DIC, where the XML file is loaded automatically. Thus the following
// code must be kept synchronized with validation.xml
/* @var $metadata ClassMetadata */
/** @var ClassMetadata $metadata */
$metadata->addConstraint(new Form());
$metadata->addConstraint(new Traverse(false));

View File

@@ -253,7 +253,7 @@ class ViolationMapper implements ViolationMapperInterface
// Test mapping rules as long as we have any
foreach ($rules as $key => $rule) {
/* @var MappingRule $rule */
/** @var MappingRule $rule */
// Mapping rule matches completely, terminate.
if (null !== ($form = $rule->match($chunk))) {
@@ -317,7 +317,7 @@ class ViolationMapper implements ViolationMapperInterface
// Cut the piece out of the property path and proceed
$propertyPathBuilder->remove($i);
} else {
/* @var \Symfony\Component\PropertyAccess\PropertyPathInterface $propertyPath */
/** @var \Symfony\Component\PropertyAccess\PropertyPathInterface $propertyPath */
$propertyPath = $scope->getPropertyPath();
if (null === $propertyPath) {

View File

@@ -147,7 +147,7 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB
public function getFormConfig(): FormConfigInterface
{
/** @var $config self */
/** @var self $config */
$config = parent::getFormConfig();
$config->children = [];

View File

@@ -77,7 +77,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
if ($error instanceof FormError) {
$string .= 'ERROR: '.$error->getMessage()."\n";
} else {
/* @var self $error */
/** @var self $error */
$string .= $error->getForm()->getName().":\n";
$string .= self::indent((string) $error);
}

View File

@@ -130,7 +130,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface
$this->innerType->finishView($view, $form, $options);
foreach ($this->typeExtensions as $extension) {
/* @var FormTypeExtensionInterface $extension */
/** @var FormTypeExtensionInterface $extension */
$extension->finishView($view, $form, $options);
}
}

View File

@@ -1052,7 +1052,7 @@ class SimpleFormTest extends TestCase
$config = $this->getBuilder()->setData('DEFAULT')->getFormConfig();
$form = new Form($config);
/* @var Form $form */
/** @var Form $form */
$form->initialize();
$this->assertSame('DEFAULT', $form->getData());