diff --git a/src/PseudoTypes/NonEmptyArray.php b/src/PseudoTypes/NonEmptyArray.php index d353686..4aa3720 100644 --- a/src/PseudoTypes/NonEmptyArray.php +++ b/src/PseudoTypes/NonEmptyArray.php @@ -39,7 +39,7 @@ public function __toString(): string } if ($this->keyType) { - return 'non-empty-array<' . $this->keyType . ',' . $this->valueType . '>'; + return 'non-empty-array<' . $this->keyType . ', ' . $this->valueType . '>'; } return 'non-empty-array<' . $this->valueType . '>'; diff --git a/src/Types/AbstractList.php b/src/Types/AbstractList.php index 32eb0f2..83f032d 100644 --- a/src/Types/AbstractList.php +++ b/src/Types/AbstractList.php @@ -81,7 +81,7 @@ public function __toString(): string } if ($this->keyType) { - return 'array<' . $this->keyType . ',' . $this->valueType . '>'; + return 'array<' . $this->keyType . ', ' . $this->valueType . '>'; } if ($this->valueType instanceof Compound) { diff --git a/src/Types/Iterable_.php b/src/Types/Iterable_.php index f7d2264..3ac6ef6 100644 --- a/src/Types/Iterable_.php +++ b/src/Types/Iterable_.php @@ -30,7 +30,7 @@ public function __toString(): string } if ($this->keyType) { - return 'iterable<' . $this->keyType . ',' . $this->valueType . '>'; + return 'iterable<' . $this->keyType . ', ' . $this->valueType . '>'; } return 'iterable<' . $this->valueType . '>'; diff --git a/tests/unit/CollectionResolverTest.php b/tests/unit/CollectionResolverTest.php index 815cb96..407ae41 100644 --- a/tests/unit/CollectionResolverTest.php +++ b/tests/unit/CollectionResolverTest.php @@ -102,10 +102,10 @@ public function testResolvingArrayCollectionWithKey(): void { $fixture = new TypeResolver(); - $resolvedType = $fixture->resolve('array', new Context('')); + $resolvedType = $fixture->resolve('array', new Context('')); $this->assertInstanceOf(Array_::class, $resolvedType); - $this->assertSame('array', (string) $resolvedType); + $this->assertSame('array', (string) $resolvedType); $valueType = $resolvedType->getValueType(); @@ -127,7 +127,7 @@ public function testResolvingArrayCollectionWithKeyAndWhitespace(): void $resolvedType = $fixture->resolve('array', new Context('')); $this->assertInstanceOf(Array_::class, $resolvedType); - $this->assertSame('array', (string) $resolvedType); + $this->assertSame('array', (string) $resolvedType); $valueType = $resolvedType->getValueType(); @@ -170,16 +170,16 @@ public function testResolvingCollectionOfCollection(): void public function testGoodArrayCollectionKey(): void { $fixture = new TypeResolver(); - $resolvedType = $fixture->resolve('array', new Context('')); + $resolvedType = $fixture->resolve('array', new Context('')); $this->assertInstanceOf(Array_::class, $resolvedType); - $this->assertSame('array', (string) $resolvedType); + $this->assertSame('array', (string) $resolvedType); $fixture = new TypeResolver(); - $resolvedType = $fixture->resolve('array', new Context('')); + $resolvedType = $fixture->resolve('array', new Context('')); $this->assertInstanceOf(Array_::class, $resolvedType); - $this->assertSame('array', (string) $resolvedType); + $this->assertSame('array', (string) $resolvedType); } public function testMissingStartCollection(): void @@ -218,7 +218,7 @@ public function testResolvingCollectionAsArray(): void $resolvedType = $fixture->resolve('array', new Context('')); $this->assertInstanceOf(Array_::class, $resolvedType); - $this->assertSame('array', (string) $resolvedType); + $this->assertSame('array', (string) $resolvedType); $valueType = $resolvedType->getValueType(); diff --git a/tests/unit/PseudoTypes/NonEmptyArrayTest.php b/tests/unit/PseudoTypes/NonEmptyArrayTest.php index bc3bc18..50abda7 100644 --- a/tests/unit/PseudoTypes/NonEmptyArrayTest.php +++ b/tests/unit/PseudoTypes/NonEmptyArrayTest.php @@ -56,7 +56,7 @@ public function provideToStringData(): array new Compound([new Integer(), new String_()]), new String_() ), - 'non-empty-array', + 'non-empty-array', ], ]; } diff --git a/tests/unit/Types/ArrayTest.php b/tests/unit/Types/ArrayTest.php index 3c567dd..8201f29 100644 --- a/tests/unit/Types/ArrayTest.php +++ b/tests/unit/Types/ArrayTest.php @@ -64,7 +64,7 @@ public function provideToStringData(): array 'array of mixed' => [new Array_(new Mixed_()), 'mixed[]'], 'array of single type' => [new Array_(new String_()), 'string[]'], 'array of compound type' => [new Array_(new Compound([new Integer(), new String_()])), '(int|string)[]'], - 'array with key type' => [new Array_(new String_(), new Integer()), 'array'], + 'array with key type' => [new Array_(new String_(), new Integer()), 'array'], ]; } } diff --git a/tests/unit/Types/IterableTest.php b/tests/unit/Types/IterableTest.php index d43216b..7520ce3 100644 --- a/tests/unit/Types/IterableTest.php +++ b/tests/unit/Types/IterableTest.php @@ -38,7 +38,7 @@ public function provideToStringData(): array new Iterable_(new Compound([new Integer(), new String_()])), 'iterable', ], - 'iterable with key type' => [new Iterable_(new String_(), new Integer()), 'iterable'], + 'iterable with key type' => [new Iterable_(new String_(), new Integer()), 'iterable'], ]; } }