Skip to content

Commit

Permalink
MNT Remove unnecessary @var comments (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Jan 23, 2024
1 parent 0ba023d commit 16a20fc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions code/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,7 @@ public function getReportField()
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 = [];
Expand Down Expand Up @@ -431,7 +429,6 @@ public function getReportField()
} else {
$fieldFormatting[$source] = function ($value, $item) {
if ($item instanceof CMSPreviewable) {
/** @var CMSPreviewable $item */
return sprintf(
'<a class="grid-field__link-block" href="%s" title="%s">%s</a>',
Convert::raw2att($item->CMSEditLink()),
Expand Down Expand Up @@ -532,7 +529,6 @@ protected function getSourceParams()
{
$params = [];
if (Injector::inst()->has(HTTPRequest::class)) {
/** @var HTTPRequest $request */
$request = Injector::inst()->get(HTTPRequest::class);
$params = $request->param('filters') ?: $request->requestVar('filters') ?: [];
}
Expand Down
7 changes: 1 addition & 6 deletions code/ReportAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public function canView($member = null)
public function Reports()
{
$output = new ArrayList();
/** @var Report $report */
foreach (Report::get_reports() as $report) {
if ($report->canView()) {
$output->push($report);
Expand Down Expand Up @@ -160,9 +159,6 @@ public static function has_reports()

/**
* Returns the Breadcrumbs for the ReportAdmin
*
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
Expand Down Expand Up @@ -235,9 +231,8 @@ public function getEditForm($id = null, $fields = null)
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'),
));
Expand Down

0 comments on commit 16a20fc

Please sign in to comment.