From ab2122a9770b0f6b86cd6593beb891dc197972ae Mon Sep 17 00:00:00 2001 From: Robin Lehrmann Date: Wed, 10 Jul 2024 16:52:49 +0200 Subject: [PATCH] fix(metric.state) put child-class in AbstractMetric When $state is not set, we want to know the child class. --- src/Monitoring/Metric/AbstractMetric.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monitoring/Metric/AbstractMetric.php b/src/Monitoring/Metric/AbstractMetric.php index ca6531d..edcfbb4 100644 --- a/src/Monitoring/Metric/AbstractMetric.php +++ b/src/Monitoring/Metric/AbstractMetric.php @@ -16,7 +16,7 @@ abstract class AbstractMetric implements AttributeInterface public function getState(): MetricStateEnum { if ($this->state === null) { - throw new \RuntimeException(__CLASS__.'::$state is not set.'); + throw new \RuntimeException(static::class.'::$state is not set.'); } return $this->state;