Skip to content

Commit 3fd3782

Browse files
committed
Fixed type issues from DtoTestCase class
1 parent bdd72da commit 3fd3782

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/Integration/TestCase/DtoTestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ private static function initializePropertyExtractor(): PropertyInfoExtractor
232232
private function getValueForProperty(ReflectionClass $dtoReflection, ReflectionProperty $reflectionProperty): mixed
233233
{
234234
return PhpUnitUtil::getValidValueForType(
235-
self::getType($dtoReflection->getName(), $reflectionProperty->getName())
235+
self::getType($dtoReflection->getName(), $reflectionProperty->getName()),
236+
null,
236237
);
237238
}
238239

tests/Utils/PhpUnitUtil.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public static function setProperty(string $property, UuidInterface | array | nul
209209
*
210210
* @throws Throwable
211211
*/
212-
public static function getValidValueForType(string $type, FieldMapping|AssociationMapping $meta): mixed
212+
public static function getValidValueForType(string $type, FieldMapping|AssociationMapping|null $meta): mixed
213213
{
214214
$cacheKey = $type . serialize($meta);
215215

@@ -260,7 +260,7 @@ public static function getInvalidValueForType(string $type): DateTime | stdClass
260260
* @param class-string $type
261261
*/
262262
private static function getValidValue(
263-
FieldMapping|AssociationMapping $meta,
263+
FieldMapping|AssociationMapping|null $meta,
264264
string $type
265265
): mixed {
266266
$class = stdClass::class;

0 commit comments

Comments
 (0)