From c8134884123c141a415c85b0778b36ffafe734d7 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 28 Sep 2016 11:34:42 +1300 Subject: [PATCH] MINOR: Make use of static::class --- code/Report.php | 4 ++-- code/ReportWrapper.php | 2 +- code/SideReport.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/Report.php b/code/Report.php index 91a563b4..a49ada65 100644 --- a/code/Report.php +++ b/code/Report.php @@ -171,7 +171,7 @@ class Report extends ViewableData { return Controller::join_links( ReportAdmin::singleton()->Link('show'), - $this->sanitiseClassName(get_class($this)), + $this->sanitiseClassName(static::class), $action ); } @@ -197,7 +197,7 @@ class Report extends ViewableData $sourceRecords = $this->sourceRecords($params, null, null); 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 $sourceRecords->count(); diff --git a/code/ReportWrapper.php b/code/ReportWrapper.php index 3287a459..7ba44e76 100644 --- a/code/ReportWrapper.php +++ b/code/ReportWrapper.php @@ -28,7 +28,7 @@ abstract class ReportWrapper extends Report public function ID() { - return get_class($this->baseReport) . '_' . get_class($this); + return get_class($this->baseReport) . '_' . static::class; } /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/code/SideReport.php b/code/SideReport.php index af08fb6b..a585dd88 100644 --- a/code/SideReport.php +++ b/code/SideReport.php @@ -43,7 +43,7 @@ class SideReportView extends ViewableData $columns = $this->report->columns(); if ($records && $records->Count()) { - $result = "