|
9 | 9 | use Doctrine\Common\Collections\ArrayCollection;
|
10 | 10 | use Doctrine\ORM\EntityManagerInterface;
|
11 | 11 | use Doctrine\ORM\Mapping\Column;
|
12 |
| -use Doctrine\ORM\Query\AST\TypedExpression; |
13 | 12 | use Doctrine\ORM\Tools\SchemaTool;
|
14 | 13 | use PHPStan\Testing\PHPStanTestCase;
|
15 | 14 | use PHPStan\Type\Accessory\AccessoryNumericStringType;
|
@@ -615,19 +614,15 @@ public function getTestData(): iterable
|
615 | 614 | ],
|
616 | 615 | [
|
617 | 616 | new ConstantIntegerType(3),
|
618 |
| - $this->hasTypedExpressions() |
619 |
| - ? $this->uint() |
620 |
| - : $this->uintStringified(), |
| 617 | + $this->uint(), |
621 | 618 | ],
|
622 | 619 | [
|
623 | 620 | new ConstantIntegerType(4),
|
624 | 621 | TypeCombinator::addNull($this->intStringified()),
|
625 | 622 | ],
|
626 | 623 | [
|
627 | 624 | new ConstantIntegerType(5),
|
628 |
| - $this->hasTypedExpressions() |
629 |
| - ? $this->uint() |
630 |
| - : $this->uintStringified(), |
| 625 | + $this->uint(), |
631 | 626 | ],
|
632 | 627 | [
|
633 | 628 | new ConstantIntegerType(6),
|
@@ -682,9 +677,7 @@ public function getTestData(): iterable
|
682 | 677 | ],
|
683 | 678 | [
|
684 | 679 | new ConstantStringType('count'),
|
685 |
| - $this->hasTypedExpressions() |
686 |
| - ? $this->uint() |
687 |
| - : $this->uintStringified(), |
| 680 | + $this->uint(), |
688 | 681 | ],
|
689 | 682 | ]),
|
690 | 683 | '
|
@@ -1360,23 +1353,17 @@ public function getTestData(): iterable
|
1360 | 1353 | $this->constantArray([
|
1361 | 1354 | [
|
1362 | 1355 | new ConstantIntegerType(1),
|
1363 |
| - $this->hasTypedExpressions() |
1364 |
| - ? $this->uint() |
1365 |
| - : $this->uintStringified(), |
| 1356 | + $this->uint(), |
1366 | 1357 | ],
|
1367 | 1358 | [
|
1368 | 1359 | new ConstantIntegerType(2),
|
1369 | 1360 | TypeCombinator::addNull(
|
1370 |
| - $this->hasTypedExpressions() |
1371 |
| - ? $this->uint() |
1372 |
| - : $this->uintStringified() |
| 1361 | + $this->uint() |
1373 | 1362 | ),
|
1374 | 1363 | ],
|
1375 | 1364 | [
|
1376 | 1365 | new ConstantIntegerType(3),
|
1377 |
| - $this->hasTypedExpressions() |
1378 |
| - ? $this->uint() |
1379 |
| - : $this->uintStringified(), |
| 1366 | + $this->uint(), |
1380 | 1367 | ],
|
1381 | 1368 | ]),
|
1382 | 1369 | '
|
@@ -1568,9 +1555,7 @@ public function getTestData(): iterable
|
1568 | 1555 | [new ConstantIntegerType(1), TypeCombinator::addNull($this->numericStringOrInt())],
|
1569 | 1556 | [
|
1570 | 1557 | new ConstantIntegerType(2),
|
1571 |
| - $this->hasTypedExpressions() |
1572 |
| - ? $this->uint() |
1573 |
| - : $this->uintStringified(), |
| 1558 | + $this->uint(), |
1574 | 1559 | ],
|
1575 | 1560 | ]),
|
1576 | 1561 | '
|
@@ -1706,11 +1691,6 @@ private function unumericStringified(): Type
|
1706 | 1691 | );
|
1707 | 1692 | }
|
1708 | 1693 |
|
1709 |
| - private function hasTypedExpressions(): bool |
1710 |
| - { |
1711 |
| - return class_exists(TypedExpression::class); |
1712 |
| - } |
1713 |
| - |
1714 | 1694 | /**
|
1715 | 1695 | * @param array<mixed[]> $arrays
|
1716 | 1696 | *
|
|
0 commit comments