Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing phpdoc #6947

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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