Merge pull request #54 from sminnee/the-chrisening

MINOR: Make use of static::class
This commit is contained in:
Loz Calver 2016-09-28 09:22:40 +01:00 committed by GitHub
commit fa7e0825c5
3 changed files with 4 additions and 4 deletions

View File

@ -171,7 +171,7 @@ class Report extends ViewableData
{ {
return Controller::join_links( return Controller::join_links(
ReportAdmin::singleton()->Link('show'), ReportAdmin::singleton()->Link('show'),
$this->sanitiseClassName(get_class($this)), $this->sanitiseClassName(static::class),
$action $action
); );
} }
@ -197,7 +197,7 @@ class Report extends ViewableData
$sourceRecords = $this->sourceRecords($params, null, null); $sourceRecords = $this->sourceRecords($params, null, null);
if (!$sourceRecords instanceof SS_List) { if (!$sourceRecords instanceof SS_List) {
user_error(get_class($this) . "::sourceRecords does not return an SS_List", E_USER_NOTICE); user_error(static::class . "::sourceRecords does not return an SS_List", E_USER_NOTICE);
return "-1"; return "-1";
} }
return $sourceRecords->count(); return $sourceRecords->count();

View File

@ -28,7 +28,7 @@ abstract class ReportWrapper extends Report
public function ID() public function ID()
{ {
return get_class($this->baseReport) . '_' . get_class($this); return get_class($this->baseReport) . '_' . static::class;
} }
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////

View File

@ -43,7 +43,7 @@ class SideReportView extends ViewableData
$columns = $this->report->columns(); $columns = $this->report->columns();
if ($records && $records->Count()) { if ($records && $records->Count()) {
$result = "<ul class=\"" . get_class($this) . "\">\n"; $result = "<ul class=\"" . static::class . "\">\n";
foreach ($records as $record) { foreach ($records as $record) {
$result .= "<li>\n"; $result .= "<li>\n";