From 2367690ac8cdf26d614f979e619b3243b471fa61 Mon Sep 17 00:00:00 2001 From: core23 Date: Sat, 20 Feb 2021 16:00:57 +0100 Subject: [PATCH] Add generic information for child admins --- src/Admin/AbstractAdmin.php | 6 ++++++ src/Admin/AdminExtensionInterface.php | 4 ++-- src/Admin/MenuBuilderInterface.php | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Admin/AbstractAdmin.php b/src/Admin/AbstractAdmin.php index c40e55abd5..20e938abe7 100644 --- a/src/Admin/AbstractAdmin.php +++ b/src/Admin/AbstractAdmin.php @@ -1432,6 +1432,8 @@ public function buildSideMenu($action, ?AdminInterface $childAdmin = null) * @param string $action * * @return ItemInterface + * + * @phpstan-param AdminInterface|null $childAdmin */ public function getSideMenu($action, ?AdminInterface $childAdmin = null) { @@ -3023,6 +3025,8 @@ protected function configureBatchActions($actions) * NEXT_MAJOR: remove this method. * * @deprecated Use configureTabMenu instead + * + * @phpstan-param AdminInterface|null $childAdmin */ protected function configureSideMenu(ItemInterface $menu, string $action, ?AdminInterface $childAdmin = null) { @@ -3032,6 +3036,8 @@ protected function configureSideMenu(ItemInterface $menu, string $action, ?Admin * Configures the tab menu in your admin. * * @param string $action + * + * @phpstan-param AdminInterface|null $childAdmin */ protected function configureTabMenu(ItemInterface $menu, $action, ?AdminInterface $childAdmin = null) { diff --git a/src/Admin/AdminExtensionInterface.php b/src/Admin/AdminExtensionInterface.php index 1eb69ad24e..7e8cb55a52 100644 --- a/src/Admin/AdminExtensionInterface.php +++ b/src/Admin/AdminExtensionInterface.php @@ -75,7 +75,7 @@ public function configureRoutes(AdminInterface $admin, RouteCollection $collecti * @return void * * @phpstan-param AdminInterface $admin - * @phpstan-param AdminInterface|null $childAdmin + * @phpstan-param AdminInterface|null $childAdmin * * @deprecated */ @@ -94,7 +94,7 @@ public function configureSideMenu( * @return void * * @phpstan-param AdminInterface $admin - * @phpstan-param AdminInterface|null $childAdmin + * @phpstan-param AdminInterface|null $childAdmin */ public function configureTabMenu( AdminInterface $admin, diff --git a/src/Admin/MenuBuilderInterface.php b/src/Admin/MenuBuilderInterface.php index 8c5076b294..5028b5a4c4 100644 --- a/src/Admin/MenuBuilderInterface.php +++ b/src/Admin/MenuBuilderInterface.php @@ -30,6 +30,8 @@ interface MenuBuilderInterface * @return ItemInterface|bool * * @deprecated Use buildTabMenu instead + * + * @phpstan-param AdminInterface|null $childAdmin */ public function buildSideMenu($action, ?AdminInterface $childAdmin = null); @@ -39,6 +41,8 @@ public function buildSideMenu($action, ?AdminInterface $childAdmin = null); * @param string $action * * @return ItemInterface|bool + * + * @phpstan-param AdminInterface|null $childAdmin */ public function buildTabMenu($action, ?AdminInterface $childAdmin = null); }