Skip to content

Commit 6aee7ee

Browse files
committed
phpstan 2.0
1 parent 9c32917 commit 6aee7ee

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"vimeo/psalm": "^5.4",
2525
"symfony/cache": "^5.3||^6.2",
2626
"php-parallel-lint/php-parallel-lint": "^1.3.2",
27-
"phpstan/phpstan": "^1.12"
27+
"phpstan/phpstan": "^1.12 || ^2.0"
2828
},
2929
"suggest": {
3030
"ramsey/uuid-doctrine": "Support for an UUID Doctrine type"

src/Attribute/Entity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(
3030
) {
3131
}
3232

33-
public function getGroup(): string|null
33+
public function getGroup(): string
3434
{
3535
return $this->group;
3636
}

src/Input/InputFactory.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public function get(string $id, array $requiredFields = [], array $optionalField
5959
}
6060

6161
/**
62-
* @param string[] $optionalFields
63-
* @param array<int, InputObjectField> $fields
62+
* @param string[] $optionalFields
63+
* @param array<int|string, InputObjectField> $fields
6464
*/
6565
protected function addOptionalFields(
6666
mixed $targetEntity,
@@ -94,8 +94,8 @@ protected function addOptionalFields(
9494
}
9595

9696
/**
97-
* @param string[] $requiredFields
98-
* @param array<int, InputObjectField> $fields
97+
* @param string[] $requiredFields
98+
* @param array<int|string, InputObjectField> $fields
9999
*/
100100
protected function addRequiredFields(
101101
mixed $targetEntity,
@@ -128,7 +128,7 @@ protected function addRequiredFields(
128128
}
129129
}
130130

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

0 commit comments

Comments
 (0)