diff --git a/src/Objects/Exceptions/UnsupportedPhpVersionException.php b/src/Objects/Exceptions/UnsupportedPhpVersionException.php index bcc8938..af319ba 100644 --- a/src/Objects/Exceptions/UnsupportedPhpVersionException.php +++ b/src/Objects/Exceptions/UnsupportedPhpVersionException.php @@ -8,5 +8,4 @@ class UnsupportedPhpVersionException extends RuntimeException { - } diff --git a/src/Objects/Schema/Generation/Annotations/AvroItems.php b/src/Objects/Schema/Generation/Annotations/AvroItems.php index 5c158bf..8447fa8 100644 --- a/src/Objects/Schema/Generation/Annotations/AvroItems.php +++ b/src/Objects/Schema/Generation/Annotations/AvroItems.php @@ -13,11 +13,14 @@ */ final class AvroItems implements TypeOnlyAttribute { + /** + * @var mixed + */ public $value; public function value(): array { - $value = is_array($this->value) ? $this->value : [$this->value]; + $value = \is_array($this->value) ? $this->value : [$this->value]; return array_map(function ($value) { if ($value instanceof AvroType) { diff --git a/src/Objects/Schema/Generation/Annotations/AvroValues.php b/src/Objects/Schema/Generation/Annotations/AvroValues.php index 713f756..05dde2a 100644 --- a/src/Objects/Schema/Generation/Annotations/AvroValues.php +++ b/src/Objects/Schema/Generation/Annotations/AvroValues.php @@ -13,11 +13,14 @@ */ final class AvroValues implements TypeOnlyAttribute { + /** + * @var mixed + */ public $value; public function value(): array { - $value = is_array($this->value) ? $this->value : [$this->value]; + $value = \is_array($this->value) ? $this->value : [$this->value]; return array_map(function ($value) { if ($value instanceof AvroType) { diff --git a/test/Objects/Schema/Generation/SchemaGeneratorTest.php b/test/Objects/Schema/Generation/SchemaGeneratorTest.php index d91bd11..2930de9 100644 --- a/test/Objects/Schema/Generation/SchemaGeneratorTest.php +++ b/test/Objects/Schema/Generation/SchemaGeneratorTest.php @@ -22,20 +22,6 @@ protected function setUp(): void ); } - abstract protected function makeSchemaAttributeReader(): SchemaAttributeReader; - - abstract protected function getEmptyRecordClass(): string; - - abstract protected function getPrimitiveTypesClass(): string; - - abstract protected function getRecordWithComplexTypesClass(): string; - - abstract protected function getRecordWithRecordTypeClass(): string; - - abstract protected function getArraysWithComplexTypeClass(): string; - - abstract protected function getMapsWithComplexTypeClass(): string; - /** * @test */ @@ -235,4 +221,18 @@ public function it_should_generate_a_record_schema_with_maps_containing_complex_ $this->assertEquals($expected, $schema); } + + abstract protected function makeSchemaAttributeReader(): SchemaAttributeReader; + + abstract protected function getEmptyRecordClass(): string; + + abstract protected function getPrimitiveTypesClass(): string; + + abstract protected function getRecordWithComplexTypesClass(): string; + + abstract protected function getRecordWithRecordTypeClass(): string; + + abstract protected function getArraysWithComplexTypeClass(): string; + + abstract protected function getMapsWithComplexTypeClass(): string; }