Skip to content

Commit

Permalink
Add missing phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu authored and VincentLanglet committed Mar 18, 2021
1 parent ce1274e commit 00811ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Admin/AbstractAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
/**
* @author Thomas Rabaix <[email protected]>
*
* @psalm-import-type FieldDescriptionOptions from FieldDescriptionInterface
*
* @phpstan-template T of object
* @phpstan-extends AbstractTaggedAdmin<T>
* @phpstan-implements AdminInterface<T>
Expand Down Expand Up @@ -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<string, mixed> $options
*/
final public function createFieldDescription(string $propertyName, array $options = []): FieldDescriptionInterface
{
$fieldDescriptionFactory = $this->getFieldDescriptionFactory();
Expand Down
4 changes: 4 additions & 0 deletions src/Model/ModelManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
*/
Expand All @@ -38,6 +40,8 @@ interface ModelManagerInterface extends DatagridManagerInterface
* @return FieldDescriptionInterface
*
* @phpstan-param class-string $class
* @psalm-param FieldDescriptionOptions $options
* @phpstan-param array<string, mixed> $options
*/
public function getNewFieldDescriptionInstance($class, $name, array $options = []);

Expand Down

0 comments on commit 00811ac

Please sign in to comment.