Skip to content

Commit

Permalink
Remove unnecessary dynamic properties #174
Browse files Browse the repository at this point in the history
  • Loading branch information
bwalkerl committed Jun 21, 2024
1 parent e7bf0c2 commit 31b8bcf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
8 changes: 0 additions & 8 deletions classes/check/collectorcheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
4 changes: 1 addition & 3 deletions classes/check/metriccheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand All @@ -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();
}

/**
Expand Down

0 comments on commit 31b8bcf

Please sign in to comment.