Skip to content

Commit 4bb766e

Browse files
committed
[wip] fix phpstan and cs-fixer issues
1 parent ec7314c commit 4bb766e

4 files changed

Lines changed: 22 additions & 17 deletions

File tree

src/Objects/Exceptions/UnsupportedPhpVersionException.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@
88

99
class UnsupportedPhpVersionException extends RuntimeException
1010
{
11-
1211
}

src/Objects/Schema/Generation/Annotations/AvroItems.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
*/
1414
final class AvroItems implements TypeOnlyAttribute
1515
{
16+
/**
17+
* @var mixed
18+
*/
1619
public $value;
1720

1821
public function value(): array
1922
{
20-
$value = is_array($this->value) ? $this->value : [$this->value];
23+
$value = \is_array($this->value) ? $this->value : [$this->value];
2124

2225
return array_map(function ($value) {
2326
if ($value instanceof AvroType) {

src/Objects/Schema/Generation/Annotations/AvroValues.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
*/
1414
final class AvroValues implements TypeOnlyAttribute
1515
{
16+
/**
17+
* @var mixed
18+
*/
1619
public $value;
1720

1821
public function value(): array
1922
{
20-
$value = is_array($this->value) ? $this->value : [$this->value];
23+
$value = \is_array($this->value) ? $this->value : [$this->value];
2124

2225
return array_map(function ($value) {
2326
if ($value instanceof AvroType) {

test/Objects/Schema/Generation/SchemaGeneratorTest.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,6 @@ protected function setUp(): void
2222
);
2323
}
2424

25-
abstract protected function makeSchemaAttributeReader(): SchemaAttributeReader;
26-
27-
abstract protected function getEmptyRecordClass(): string;
28-
29-
abstract protected function getPrimitiveTypesClass(): string;
30-
31-
abstract protected function getRecordWithComplexTypesClass(): string;
32-
33-
abstract protected function getRecordWithRecordTypeClass(): string;
34-
35-
abstract protected function getArraysWithComplexTypeClass(): string;
36-
37-
abstract protected function getMapsWithComplexTypeClass(): string;
38-
3925
/**
4026
* @test
4127
*/
@@ -235,4 +221,18 @@ public function it_should_generate_a_record_schema_with_maps_containing_complex_
235221

236222
$this->assertEquals($expected, $schema);
237223
}
224+
225+
abstract protected function makeSchemaAttributeReader(): SchemaAttributeReader;
226+
227+
abstract protected function getEmptyRecordClass(): string;
228+
229+
abstract protected function getPrimitiveTypesClass(): string;
230+
231+
abstract protected function getRecordWithComplexTypesClass(): string;
232+
233+
abstract protected function getRecordWithRecordTypeClass(): string;
234+
235+
abstract protected function getArraysWithComplexTypeClass(): string;
236+
237+
abstract protected function getMapsWithComplexTypeClass(): string;
238238
}

0 commit comments

Comments
 (0)