Skip to content

Commit 3559792

Browse files
Try
1 parent f33a8d1 commit 3559792

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Type/Doctrine/Descriptors/DecimalType.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
use Doctrine\DBAL\Connection;
66
use PHPStan\Doctrine\Driver\DriverDetector;
7+
use PHPStan\Type\Accessory\AccessoryLowercaseStringType;
78
use PHPStan\Type\Accessory\AccessoryNumericStringType;
9+
use PHPStan\Type\Accessory\AccessoryUppercaseStringType;
810
use PHPStan\Type\FloatType;
911
use PHPStan\Type\IntegerType;
1012
use PHPStan\Type\IntersectionType;
@@ -31,7 +33,12 @@ public function getType(): string
3133

3234
public function getWritableToPropertyType(): Type
3335
{
34-
return (new FloatType())->toString();
36+
return new IntersectionType([
37+
new StringType(),
38+
new AccessoryNumericStringType(),
39+
new AccessoryLowercaseStringType(),
40+
new AccessoryUppercaseStringType(),
41+
]);
3542
}
3643

3744
public function getWritableToDatabaseType(): Type

0 commit comments

Comments
 (0)