Skip to content

Commit

Permalink
fix(metric.state) put child-class in AbstractMetric
Browse files Browse the repository at this point in the history
When $state is not set, we want to know the child class.
  • Loading branch information
Robin Lehrmann committed Jul 10, 2024
1 parent 72ee5a9 commit ab2122a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Monitoring/Metric/AbstractMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ab2122a

Please sign in to comment.