Skip to content

Commit 1b03ee7

Browse files
More
1 parent 1392b6d commit 1b03ee7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/Type/Doctrine/Query/QueryResultTypeWalkerHydrationModeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ private static function list(Type $values): Type
309309
return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), $values));
310310
}
311311

312-
private static function numericString(bool $lowercase = false): Type
312+
private static function numericString(bool $lowercase = false, bool $uppercase = false): Type
313313
{
314314
$types = [
315315
new StringType(),
@@ -406,14 +406,14 @@ private static function stringifies(): bool
406406
private static function floatOrStringified(): Type
407407
{
408408
return self::stringifies()
409-
? self::numericString()
409+
? self::numericString(false, true)
410410
: new FloatType();
411411
}
412412

413413
private static function floatOrIntOrStringified(): Type
414414
{
415415
return self::stringifies()
416-
? self::numericString()
416+
? self::numericString(false, true)
417417
: TypeCombinator::union(new FloatType(), new IntegerType());
418418
}
419419

tests/Type/Doctrine/Query/QueryResultTypeWalkerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ public function getTestData(): iterable
789789
[
790790
new ConstantIntegerType(4),
791791
$this->stringifies()
792-
? $this->numericString()
792+
? $this->numericString(false, true)
793793
: TypeCombinator::union(
794794
new IntegerType(),
795795
new FloatType()
@@ -1475,7 +1475,7 @@ public function getTestData(): iterable
14751475
yield 'unary minus' => [
14761476
$this->constantArray([
14771477
[new ConstantStringType('minusInt'), $this->stringifies() ? new ConstantStringType('-1') : new ConstantIntegerType(-1)],
1478-
[new ConstantStringType('minusFloat'), $this->stringifies() ? $this->numericString() : new ConstantFloatType(-0.1)],
1478+
[new ConstantStringType('minusFloat'), $this->stringifies() ? $this->numericString(false, true) : new ConstantFloatType(-0.1)],
14791479
[new ConstantStringType('minusIntRange'), $this->stringifies() ? $this->numericString(true, true) : IntegerRangeType::fromInterval(null, 0)],
14801480
]),
14811481
'

0 commit comments

Comments
 (0)