From 35bc8065df1bc79c30f7a14301b0566879ebb004 Mon Sep 17 00:00:00 2001 From: Mark Armendariz Date: Wed, 20 Jul 2022 22:47:22 -0500 Subject: [PATCH] A accidentally, a return --- src/Log.php | 2 +- src/SpanMeta.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Log.php b/src/Log.php index c9116a5..8aea1f2 100644 --- a/src/Log.php +++ b/src/Log.php @@ -236,7 +236,7 @@ public static function setProcessIsError(bool $bIsError): void { } public static function getPurpose(): string { - self::$aSpanMetas[self::getCurrentRequestHash()]->getName(); + return self::$aSpanMetas[self::getCurrentRequestHash()]->getName(); } /** diff --git a/src/SpanMeta.php b/src/SpanMeta.php index 4713c45..97ec6c3 100644 --- a/src/SpanMeta.php +++ b/src/SpanMeta.php @@ -15,7 +15,7 @@ class SpanMeta { // const VERSION = 1: included tags, which were not used private const VERSION = 2; - private string $sName; + private string $sName = ''; private bool $bMetrics; @@ -28,7 +28,6 @@ class SpanMeta { public Timer $Timer; public function __construct(DateTime $oStart, $sMetrics = self::METRICS_OFF) { - $this->sName = ''; $this->bMetrics = $sMetrics === self::METRICS_ON; $this->oStart = $oStart; $this->bError = false;