From bb4e0c0058a8638412a30152f6ffe955dc85f438 Mon Sep 17 00:00:00 2001 From: Alexander Smaga Date: Fri, 2 Oct 2020 05:15:05 +0300 Subject: [PATCH] [php][bug] Fix offsetGet in model generic to return offset rather than bool|null (#7571) --- .../src/main/resources/php/model_generic.mustache | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php | 2 +- .../OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Category.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Client.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/File.php | 2 +- .../php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HealthCheckResult.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 2 +- .../lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Model200Response.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php | 2 +- .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/User.php | 2 +- 45 files changed, 45 insertions(+), 45 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/model_generic.mustache b/modules/openapi-generator/src/main/resources/php/model_generic.mustache index 40802715829..ec2140c2a9d 100644 --- a/modules/openapi-generator/src/main/resources/php/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/php/model_generic.mustache @@ -368,7 +368,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index 023ecf32ec2..81a3499d8d7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -283,7 +283,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index aad9487cc94..a271cc089bf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -289,7 +289,7 @@ class Animal implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index d21fa35621f..e79cbda775c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -313,7 +313,7 @@ class ApiResponse implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 4deeb067f68..1678eae2ede 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -253,7 +253,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index cf6fe89d16e..be734d3b197 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -253,7 +253,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index 7f598ae04fa..7a75b3a8890 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -313,7 +313,7 @@ class ArrayTest implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index 5fa154bee4a..87facb63e0c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -403,7 +403,7 @@ class Capitalization implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 75e10661e9f..dec9256e001 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -247,7 +247,7 @@ class Cat extends Animal */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php index d40c515390f..cb687fa898e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php @@ -253,7 +253,7 @@ class CatAllOf implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index 6137a324600..c3c3602e9f9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -286,7 +286,7 @@ class Category implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index 9754dc5466c..041b6337be9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -254,7 +254,7 @@ class ClassModel implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 8099e47db03..5be1902d0a2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -253,7 +253,7 @@ class Client implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index 8e60b41c02c..d4eb2811544 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -247,7 +247,7 @@ class Dog extends Animal */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php index d6edf67ccee..9696b379476 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php @@ -253,7 +253,7 @@ class DogAllOf implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index ed05ebfacf7..1b1436fe18f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -339,7 +339,7 @@ class EnumArrays implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 8d4bd318cee..397dddb1c20 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -598,7 +598,7 @@ class EnumTest implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php index cb0a923af33..071669c48d4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -254,7 +254,7 @@ class File implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php index 165c679fdc3..be014cca129 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -283,7 +283,7 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php index b7562e15700..152b602f451 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php @@ -253,7 +253,7 @@ class Foo implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 49b33571f0c..817764f8c37 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -807,7 +807,7 @@ class FormatTest implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index eb7571b2651..78a8753aca7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -283,7 +283,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php index ec6b27724c8..73f41bd67eb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php @@ -254,7 +254,7 @@ class HealthCheckResult implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php index 05aed891fbb..4f621cd478a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject.php @@ -283,7 +283,7 @@ class InlineObject implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php index a1dbbb404ab..5a8e35b8463 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject1.php @@ -283,7 +283,7 @@ class InlineObject1 implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php index d5849b23744..5bc7a4051fb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject2.php @@ -341,7 +341,7 @@ class InlineObject2 implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php index 4fa7ba14dd7..c578cb156d2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject3.php @@ -761,7 +761,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php index 04a9d074343..5fd4bc02241 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject4.php @@ -289,7 +289,7 @@ class InlineObject4 implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php index fba00cddf6a..af2410338d5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineObject5.php @@ -286,7 +286,7 @@ class InlineObject5 implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php index b2ff1f1b8f1..d59fd178654 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php @@ -253,7 +253,7 @@ class InlineResponseDefault implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index e6f4a129455..055a190f94a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -367,7 +367,7 @@ class MapTest implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 31bcc81816d..92b5bd77972 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -313,7 +313,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 92b79ab9c60..820f723b075 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -284,7 +284,7 @@ class Model200Response implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index dacecc851ab..68e72f7babc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -253,7 +253,7 @@ class ModelList implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 26f905224a0..b36cab5bef2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -254,7 +254,7 @@ class ModelReturn implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index 9f4fe7734c2..373384beb13 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -347,7 +347,7 @@ class Name implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php index f00792ef364..e3882176118 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php @@ -583,7 +583,7 @@ class NullableClass implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 0f4af94c9ff..e1711295beb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -253,7 +253,7 @@ class NumberOnly implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index 34084f1ea23..dcecafd9a80 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -437,7 +437,7 @@ class Order implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index f2558176b29..a66e335b1a2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -313,7 +313,7 @@ class OuterComposite implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index 7bbdafe0966..ff197d2c3ff 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -443,7 +443,7 @@ class Pet implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index d859ef1b611..fe323668361 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -283,7 +283,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index 4ea1a0f26de..967231c35ff 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -253,7 +253,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index 3eb455e0f7c..f4f85825e58 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -283,7 +283,7 @@ class Tag implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index 4e40a57fd78..f2436c70ad4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -463,7 +463,7 @@ class User implements ModelInterface, ArrayAccess */ public function offsetGet($offset) { - return isset($this->container[$offset]) ?? null; + return $this->container[$offset] ?? null; } /**