Skip to content

Commit

Permalink
Try
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Nov 20, 2024
1 parent f33a8d1 commit 3559792
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Type/Doctrine/Descriptors/DecimalType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

use Doctrine\DBAL\Connection;
use PHPStan\Doctrine\Driver\DriverDetector;
use PHPStan\Type\Accessory\AccessoryLowercaseStringType;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\Accessory\AccessoryUppercaseStringType;
use PHPStan\Type\FloatType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
Expand All @@ -31,7 +33,12 @@ public function getType(): string

public function getWritableToPropertyType(): Type
{
return (new FloatType())->toString();
return new IntersectionType([
new StringType(),
new AccessoryNumericStringType(),
new AccessoryLowercaseStringType(),
new AccessoryUppercaseStringType(),
]);
}

public function getWritableToDatabaseType(): Type
Expand Down

0 comments on commit 3559792

Please sign in to comment.