Skip to content

Commit

Permalink
phpstan 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHAnderson committed Nov 18, 2024
1 parent 9c32917 commit 6aee7ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"vimeo/psalm": "^5.4",
"symfony/cache": "^5.3||^6.2",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpstan/phpstan": "^1.12"
"phpstan/phpstan": "^1.12 || ^2.0"
},
"suggest": {
"ramsey/uuid-doctrine": "Support for an UUID Doctrine type"
Expand Down
2 changes: 1 addition & 1 deletion src/Attribute/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
) {
}

public function getGroup(): string|null
public function getGroup(): string
{
return $this->group;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Input/InputFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function get(string $id, array $requiredFields = [], array $optionalField
}

/**
* @param string[] $optionalFields
* @param array<int, InputObjectField> $fields
* @param string[] $optionalFields
* @param array<int|string, InputObjectField> $fields
*/
protected function addOptionalFields(
mixed $targetEntity,
Expand Down Expand Up @@ -94,8 +94,8 @@ protected function addOptionalFields(
}

/**
* @param string[] $requiredFields
* @param array<int, InputObjectField> $fields
* @param string[] $requiredFields
* @param array<int|string, InputObjectField> $fields
*/
protected function addRequiredFields(
mixed $targetEntity,
Expand Down Expand Up @@ -128,7 +128,7 @@ protected function addRequiredFields(
}
}

/** @param array<int, InputObjectField> $fields */
/** @param array<int|string, InputObjectField> $fields */
protected function addAllFieldsAsRequired(mixed $targetEntity, array &$fields): void
{
foreach ($this->entityManager->getClassMetadata($targetEntity->getEntityClass())->getFieldNames() as $fieldName) {
Expand Down

0 comments on commit 6aee7ee

Please sign in to comment.