From 884fd92f1320d17daebb772297da03fb2cfa59b8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 1 Oct 2024 16:00:34 +0300 Subject: drop opentelemetry --- vendor/open-telemetry/sdk/Trace/StatusData.php | 84 -------------------------- 1 file changed, 84 deletions(-) delete mode 100644 vendor/open-telemetry/sdk/Trace/StatusData.php (limited to 'vendor/open-telemetry/sdk/Trace/StatusData.php') diff --git a/vendor/open-telemetry/sdk/Trace/StatusData.php b/vendor/open-telemetry/sdk/Trace/StatusData.php deleted file mode 100644 index c28ea22ab..000000000 --- a/vendor/open-telemetry/sdk/Trace/StatusData.php +++ /dev/null @@ -1,84 +0,0 @@ -code = $code; - $this->description = $description; - } - - /** @psalm-param API\StatusCode::STATUS_* $code */ - public static function create(string $code, ?string $description = null): self - { - if (empty($description)) { - switch ($code) { - case API\StatusCode::STATUS_UNSET: - return self::unset(); - case API\StatusCode::STATUS_ERROR: - return self::error(); - case API\StatusCode::STATUS_OK: - return self::ok(); - } - } - - // Ignore description for non Error statuses. - if (API\StatusCode::STATUS_ERROR !== $code) { - $description = ''; - } - - return new self($code, $description); /** @phan-suppress-current-line PhanTypeMismatchArgumentNullable */ - } - - public static function ok(): self - { - if (null === self::$ok) { - self::$ok = new self(API\StatusCode::STATUS_OK, ''); - } - - return self::$ok; - } - - public static function error(): self - { - if (null === self::$error) { - self::$error = new self(API\StatusCode::STATUS_ERROR, ''); - } - - return self::$error; - } - - public static function unset(): self - { - if (null === self::$unset) { - self::$unset = new self(API\StatusCode::STATUS_UNSET, ''); - } - - return self::$unset; - } - - public function getCode(): string - { - return $this->code; - } - - public function getDescription(): string - { - return $this->description; - } -} -- cgit v1.2.3-54-g00ecf