Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Nov 20, 2024
1 parent 05aa9a2 commit f33a8d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/Type/Doctrine/Descriptors/BigIntType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace PHPStan\Type\Doctrine\Descriptors;

use Composer\InstalledVersions;
use PHPStan\Type\Accessory\AccessoryNumericStringType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public static function getTestData(): iterable

yield 'getResult(object), fields' => [
self::list(self::constantArray([
[new ConstantStringType('decimalColumn'), self::numericString()],
[new ConstantStringType('decimalColumn'), self::numericString(false, true)],
[new ConstantStringType('floatColumn'), new FloatType()],
])),
'
Expand Down Expand Up @@ -178,7 +178,7 @@ public static function getTestData(): iterable

yield 'toIterable(object), fields' => [
new IterableType(new IntegerType(), self::constantArray([
[new ConstantStringType('decimalColumn'), self::numericString()],
[new ConstantStringType('decimalColumn'), self::numericString(false, true)],
[new ConstantStringType('floatColumn'), new FloatType()],
])),
'
Expand Down
8 changes: 4 additions & 4 deletions tests/Type/Doctrine/Query/QueryResultTypeWalkerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public function getTestData(): iterable
]),
$this->constantArray([
[new ConstantIntegerType(0), new ObjectType(One::class)],
[new ConstantStringType('id'), $hasDbal4 ? new IntegerType() : $this->numericString()],
[new ConstantStringType('id'), $hasDbal4 ? new IntegerType() : $this->numericString(true, true)],
[new ConstantStringType('intColumn'), new IntegerType()],
])
),
Expand All @@ -400,7 +400,7 @@ public function getTestData(): iterable
]),
$this->constantArray([
[new ConstantIntegerType(0), new ObjectType(Many::class)],
[new ConstantStringType('id'), $hasDbal4 ? new IntegerType() : $this->numericString()],
[new ConstantStringType('id'), $hasDbal4 ? new IntegerType() : $this->numericString(true, true)],
[new ConstantStringType('intColumn'), new IntegerType()],
])
),
Expand All @@ -421,7 +421,7 @@ public function getTestData(): iterable
]),
$this->constantArray([
[new ConstantStringType('one'), new ObjectType(One::class)],
[new ConstantStringType('id'), $hasDbal4 ? new IntegerType() : $this->numericString()],
[new ConstantStringType('id'), $hasDbal4 ? new IntegerType() : $this->numericString(true, true)],
[new ConstantStringType('intColumn'), new IntegerType()],
])
),
Expand Down Expand Up @@ -531,7 +531,7 @@ public function getTestData(): iterable
yield 'just root entity and scalars' => [
$this->constantArray([
[new ConstantIntegerType(0), new ObjectType(One::class)],
[new ConstantStringType('id'), $hasDbal4 ? new IntegerType() : $this->numericString()],
[new ConstantStringType('id'), $hasDbal4 ? new IntegerType() : $this->numericString(true, true)],
]),
'
SELECT o, o.id
Expand Down

0 comments on commit f33a8d1

Please sign in to comment.