From 31b8bcf701dca531fcc7ab590b9e3eeed2f0ea11 Mon Sep 17 00:00:00 2001 From: Benjamin Walker Date: Fri, 21 Jun 2024 11:05:06 +1000 Subject: [PATCH] Remove unnecessary dynamic properties #174 --- classes/check/collectorcheck.php | 8 -------- classes/check/metriccheck.php | 4 +--- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/classes/check/collectorcheck.php b/classes/check/collectorcheck.php index 34106a8..503f3d1 100644 --- a/classes/check/collectorcheck.php +++ b/classes/check/collectorcheck.php @@ -31,14 +31,6 @@ */ class collectorcheck extends check { - /** - * Constructor - */ - public function __construct() { - $this->id = 'checkcollectorcheck'; - $this->name = get_string('checkcollectorcheck', 'tool_cloudmetrics'); - } - /** * A link to a place to action this * diff --git a/classes/check/metriccheck.php b/classes/check/metriccheck.php index 91985b3..cd7a0ac 100644 --- a/classes/check/metriccheck.php +++ b/classes/check/metriccheck.php @@ -42,8 +42,6 @@ class metriccheck extends check { */ public function __construct($metric) { $this->metric = $metric; - $this->id = $metric->get_name(); - $this->name = $metric->get_label(); } /** @@ -52,7 +50,7 @@ public function __construct($metric) { * @return string must be unique within a component */ public function get_id(): string { - return $this->id; + return $this->metric->get_name(); } /**