Skip to content

Commit 05aa9a2

Browse files
Descriptors
1 parent 1b03ee7 commit 05aa9a2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/Type/Doctrine/Descriptors/BigIntType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getWritableToPropertyType(): Type
2525
return new IntegerType();
2626
}
2727

28-
return TypeCombinator::intersect(new StringType(), new AccessoryNumericStringType());
28+
return (new IntegerType())->toString();
2929
}
3030

3131
public function getWritableToDatabaseType(): Type

src/Type/Doctrine/Descriptors/DecimalType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function getType(): string
3131

3232
public function getWritableToPropertyType(): Type
3333
{
34-
return TypeCombinator::intersect(new StringType(), new AccessoryNumericStringType());
34+
return (new FloatType())->toString();
3535
}
3636

3737
public function getWritableToDatabaseType(): Type

tests/Type/Doctrine/Query/QueryResultTypeWalkerHydrationModeTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use PHPStan\Type\Accessory\AccessoryArrayListType;
1414
use PHPStan\Type\Accessory\AccessoryLowercaseStringType;
1515
use PHPStan\Type\Accessory\AccessoryNumericStringType;
16+
use PHPStan\Type\Accessory\AccessoryUppercaseStringType;
1617
use PHPStan\Type\ArrayType;
1718
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
1819
use PHPStan\Type\Constant\ConstantIntegerType;
@@ -318,6 +319,9 @@ private static function numericString(bool $lowercase = false, bool $uppercase =
318319
if ($lowercase) {
319320
$types[] = new AccessoryLowercaseStringType();
320321
}
322+
if ($uppercase) {
323+
$types[] = new AccessoryUppercaseStringType();
324+
}
321325

322326
return new IntersectionType($types);
323327
}

0 commit comments

Comments
 (0)