From 1c89ad03438580cdd4299cfa506388193d66a808 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 11 Jan 2024 14:18:22 +1300 Subject: [PATCH] ENH Add generic types --- src/Forms/GridFieldSiteTreeAddNewButton.php | 1 - src/Model/Lumberjack.php | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Forms/GridFieldSiteTreeAddNewButton.php b/src/Forms/GridFieldSiteTreeAddNewButton.php index 47feb3b..dd869ae 100644 --- a/src/Forms/GridFieldSiteTreeAddNewButton.php +++ b/src/Forms/GridFieldSiteTreeAddNewButton.php @@ -151,7 +151,6 @@ public function handleAction(GridField $gridField, $actionName, $arguments, $dat 'PageType' => $tmpData['pageType'] ); - /** @var $controller CMSPageAddController */ $controller = Injector::inst()->create(CMSPageAddController::class); // pass current request to newly created controller diff --git a/src/Model/Lumberjack.php b/src/Model/Lumberjack.php index 70f3bd3..7b03785 100644 --- a/src/Model/Lumberjack.php +++ b/src/Model/Lumberjack.php @@ -25,6 +25,8 @@ * @subpackage lumberjack * * @author Michael Strong + * + * @extends SiteTreeExtension */ class Lumberjack extends SiteTreeExtension { @@ -76,7 +78,7 @@ public function updateCMSFields(FieldList $fields) * * @param bool $showAll Include all of the elements, even those not shown in the menus. Only applicable when * extension is applied to {@link SiteTree}. - * @return DataList + * @return DataList */ public function stageChildren($showAll = false) { @@ -111,7 +113,7 @@ public function stageChildren($showAll = false) * instance from the original. * * @param DataList $list - * @return DataList + * @return DataList */ protected function excludeSiteTreeClassNames($list) { @@ -129,7 +131,7 @@ protected function excludeSiteTreeClassNames($list) * @param bool $showAll Include all of the elements, even those not shown in the menus. Only * applicable when extension is applied to {@link SiteTree}. * @param bool $onlyDeletedFromStage Only return items that have been deleted from stage - * @return DataList + * @return DataList * @throws Exception */ public function liveChildren($showAll = false, $onlyDeletedFromStage = false) @@ -223,7 +225,7 @@ protected function shouldFilter() * This also allows the owner class to override this method, e.g. to provide custom ordering. * * @var array $excluded List of class names excluded from the SiteTree - * @return DataList + * @return DataList */ public function getLumberjackPagesForGridfield($excluded = array()) {