diff --git a/src/Admin/AbstractAdmin.php b/src/Admin/AbstractAdmin.php index 10e84d3cf9..fbabe02e9f 100644 --- a/src/Admin/AbstractAdmin.php +++ b/src/Admin/AbstractAdmin.php @@ -53,6 +53,8 @@ /** * @author Thomas Rabaix * + * @psalm-import-type FieldDescriptionOptions from FieldDescriptionInterface + * * @phpstan-template T of object * @phpstan-extends AbstractTaggedAdmin * @phpstan-implements AdminInterface @@ -2961,6 +2963,12 @@ final public function hasTemplateRegistry(): bool return null !== $this->templateRegistry; } + /** + * NEXT_MAJOR: Move this phpdoc to the interface. + * + * @psalm-param FieldDescriptionOptions $options + * @phpstan-param array $options + */ final public function createFieldDescription(string $propertyName, array $options = []): FieldDescriptionInterface { $fieldDescriptionFactory = $this->getFieldDescriptionFactory(); diff --git a/src/Model/ModelManagerInterface.php b/src/Model/ModelManagerInterface.php index 42c9930502..ff341a2f24 100644 --- a/src/Model/ModelManagerInterface.php +++ b/src/Model/ModelManagerInterface.php @@ -24,6 +24,8 @@ * * A model manager is a bridge between the model classes and the admin functionality. * + * @psalm-import-type FieldDescriptionOptions from FieldDescriptionInterface + * * @method bool supportsQuery(object $query) * @method void reverseTransform(object $object, array $array = []) */ @@ -38,6 +40,8 @@ interface ModelManagerInterface extends DatagridManagerInterface * @return FieldDescriptionInterface * * @phpstan-param class-string $class + * @psalm-param FieldDescriptionOptions $options + * @phpstan-param array $options */ public function getNewFieldDescriptionInstance($class, $name, array $options = []);