Skip to content

Commit

Permalink
Add more generic information
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Oct 27, 2021
1 parent b5a57de commit 3d0cbd1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/Admin/AbstractAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,9 @@ protected function configureBatchActions(array $actions): array
/**
* Configures the tab menu in your admin.
*
* @phpstan-param AdminInterface<object>|null $childAdmin
* @phpstan-template TChild of object
*
* @phpstan-param AdminInterface<TChild>|null $childAdmin
*/
protected function configureTabMenu(ItemInterface $menu, string $action, ?AdminInterface $childAdmin = null): void
{
Expand Down Expand Up @@ -2479,7 +2481,9 @@ private function buildRoutes(): ?RouteCollectionInterface
}

/**
* @phpstan-param AdminInterface<object>|null $childAdmin
* @phpstan-template TChild of object
*
* @phpstan-param AdminInterface<TChild>|null $childAdmin
*/
private function buildTabMenu(string $action, ?AdminInterface $childAdmin = null): ?ItemInterface
{
Expand Down
4 changes: 3 additions & 1 deletion src/Admin/AdminExtensionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ public function configureRoutes(AdminInterface $admin, RouteCollectionInterface
/**
* Builds the tab menu.
*
* @phpstan-template TChild of object
*
* @phpstan-param AdminInterface<T> $admin
* @phpstan-param AdminInterface<object>|null $childAdmin
* @phpstan-param AdminInterface<TChild>|null $childAdmin
*/
public function configureTabMenu(
AdminInterface $admin,
Expand Down
6 changes: 6 additions & 0 deletions src/FieldDescription/FieldDescriptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ public function getParentAssociationMappings(): array;
* Set the association admin instance (only used if the field is linked to an Admin).
*
* @param AdminInterface<object> $associationAdmin
*
* @phpstan-template T of object
* @phpstan-param AdminInterface<T> $associationAdmin
*/
public function setAssociationAdmin(AdminInterface $associationAdmin): void;

Expand Down Expand Up @@ -220,6 +223,9 @@ public function getValue(object $object);

/**
* @param AdminInterface<object> $admin
*
* @phpstan-template T of object
* @phpstan-param AdminInterface<T> $admin
*/
public function setAdmin(AdminInterface $admin): void;

Expand Down

0 comments on commit 3d0cbd1

Please sign in to comment.