Skip to content

Commit

Permalink
DX: re-apply self_accessor and phpdoc_types_order by PHP CS Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus authored and nicolas-grekas committed Oct 29, 2023
1 parent 61dc1ec commit f8f763c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Type
*
* @throws \InvalidArgumentException
*/
public function __construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false, array|Type $collectionKeyType = null, array|Type $collectionValueType = null)
public function __construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false, array|self $collectionKeyType = null, array|self $collectionValueType = null)
{
if (!\in_array($builtinType, self::$builtinTypes)) {
throw new \InvalidArgumentException(sprintf('"%s" is not a valid PHP type.', $builtinType));
Expand All @@ -90,7 +90,7 @@ public function __construct(string $builtinType, bool $nullable = false, string
$this->collectionValueType = $this->validateCollectionArgument($collectionValueType, 6, '$collectionValueType') ?? [];
}

private function validateCollectionArgument(array|Type|null $collectionArgument, int $argumentIndex, string $argumentName): ?array
private function validateCollectionArgument(array|self|null $collectionArgument, int $argumentIndex, string $argumentName): ?array
{
if (null === $collectionArgument) {
return null;
Expand Down

0 comments on commit f8f763c

Please sign in to comment.