From dd5f929b2b829b150aef312031b86e835bceb80b Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:21:05 +1300 Subject: [PATCH] ENH Add generic types (#137) --- 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()) {