From 16a20fc3ce7091f7ec556c86dd98f52803b18c3f Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Wed, 24 Jan 2024 09:40:47 +1300 Subject: [PATCH] MNT Remove unnecessary `@var` comments (#172) --- code/Report.php | 4 ---- code/ReportAdmin.php | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/code/Report.php b/code/Report.php index 45e05c5d..2acffbce 100644 --- a/code/Report.php +++ b/code/Report.php @@ -401,9 +401,7 @@ class Report extends ViewableData GridFieldDataColumns::create(), GridFieldPaginator::create() ); - /** @var GridField $gridField */ $gridField = GridField::create('Report', null, $items, $gridFieldConfig); - /** @var GridFieldDataColumns $columns */ $columns = $gridField->getConfig()->getComponentByType(GridFieldDataColumns::class); $displayFields = []; $fieldCasting = []; @@ -431,7 +429,6 @@ class Report extends ViewableData } else { $fieldFormatting[$source] = function ($value, $item) { if ($item instanceof CMSPreviewable) { - /** @var CMSPreviewable $item */ return sprintf( '%s', Convert::raw2att($item->CMSEditLink()), @@ -532,7 +529,6 @@ class Report extends ViewableData { $params = []; if (Injector::inst()->has(HTTPRequest::class)) { - /** @var HTTPRequest $request */ $request = Injector::inst()->get(HTTPRequest::class); $params = $request->param('filters') ?: $request->requestVar('filters') ?: []; } diff --git a/code/ReportAdmin.php b/code/ReportAdmin.php index 7d732482..3522bd68 100644 --- a/code/ReportAdmin.php +++ b/code/ReportAdmin.php @@ -105,7 +105,6 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider public function Reports() { $output = new ArrayList(); - /** @var Report $report */ foreach (Report::get_reports() as $report) { if ($report->canView()) { $output->push($report); @@ -160,9 +159,6 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider /** * Returns the Breadcrumbs for the ReportAdmin - * - * @param bool $unlinked - * @return ArrayList */ public function Breadcrumbs($unlinked = false) { @@ -235,9 +231,8 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider GridFieldFooter::create() ); $gridField = GridField::create('Reports', false, $this->Reports(), $gridFieldConfig); - /** @var GridFieldDataColumns $columns */ $columns = $gridField->getConfig() - ->getComponentByType('SilverStripe\\Forms\\GridField\\GridFieldDataColumns'); + ->getComponentByType(GridFieldDataColumns::class); $columns->setDisplayFields(array( 'title' => _t('SilverStripe\\Reports\\ReportAdmin.ReportTitle', 'Title'), ));