Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Remove unnecessary @var comments #172

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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