From 3f4f3d07ce3bf7f26c85cfd05965b52a0582914e Mon Sep 17 00:00:00 2001 From: DEVizzent Date: Thu, 22 Jun 2023 23:06:26 +0200 Subject: [PATCH] Revert "Merge pull request #3 from WyriHaximus-labs/DEVizzent-openapi-31-8.2-deprecations" This reverts commit aeedbc7a9630c71538b566626e90cbfad0118a73, reversing changes made to c5a294e49d79b3efbb7b0c5a4e99c76abce03f29. --- src/json/JsonReference.php | 2 +- src/spec/OpenApi.php | 2 +- src/spec/Paths.php | 2 +- src/spec/Responses.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/json/JsonReference.php b/src/json/JsonReference.php index 48050dc..5f24888 100644 --- a/src/json/JsonReference.php +++ b/src/json/JsonReference.php @@ -127,7 +127,7 @@ public function getReference(): string * which is a value of any type other than a resource. */ #[\ReturnTypeWillChange] - public function jsonSerialize(): mixed + public function jsonSerialize() //: mixed { return (object)['$ref' => $this->getReference()]; } diff --git a/src/spec/OpenApi.php b/src/spec/OpenApi.php index 4010093..7476ce8 100644 --- a/src/spec/OpenApi.php +++ b/src/spec/OpenApi.php @@ -107,7 +107,7 @@ public function performValidation() */ public function getMajorVersion() { - if (is_string($this->openapi) && preg_match(static::PATTERN_VERSION, $this->openapi, $matches)) { + if (preg_match(static::PATTERN_VERSION, $this->openapi, $matches)) { switch ($matches[1]) { case '3.0': return static::VERSION_3_0; diff --git a/src/spec/Paths.php b/src/spec/Paths.php index 6132b13..e504a90 100644 --- a/src/spec/Paths.php +++ b/src/spec/Paths.php @@ -195,7 +195,7 @@ public function offsetExists($offset): bool * @return PathItem Can return all value types. */ #[\ReturnTypeWillChange] - public function offsetGet($offset): mixed + public function offsetGet($offset) //: mixed { return $this->getPath($offset); } diff --git a/src/spec/Responses.php b/src/spec/Responses.php index be3efe4..a6db447 100644 --- a/src/spec/Responses.php +++ b/src/spec/Responses.php @@ -185,7 +185,7 @@ public function offsetExists($offset): bool * @return mixed Can return all value types. */ #[\ReturnTypeWillChange] - public function offsetGet($offset): mixed + public function offsetGet($offset) //: mixed { return $this->getResponse($offset); }