Skip to content

Commit fcb67c2

Browse files
committed
Fix build
1 parent b982617 commit fcb67c2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Type/Doctrine/ArgumentsProcessor.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use PhpParser\Node\Arg;
66
use PHPStan\Analyser\Scope;
77
use PHPStan\Rules\Doctrine\ORM\DynamicQueryBuilderArgumentException;
8-
use PHPStan\Type\ConstantScalarType;
98
use PHPStan\Type\Doctrine\QueryBuilder\Expr\ExprType;
109
use function count;
1110
use function strpos;
@@ -39,20 +38,20 @@ public function processArgs(
3938
$array = [];
4039
foreach ($value->getConstantArrays()[0]->getKeyTypes() as $i => $keyType) {
4140
$valueType = $value->getConstantArrays()[0]->getValueTypes()[$i];
42-
if (!$valueType instanceof ConstantScalarType) {
41+
if (count($valueType->getConstantScalarValues()) !== 1) {
4342
throw new DynamicQueryBuilderArgumentException();
4443
}
45-
$array[$keyType->getValue()] = $valueType->getValue();
44+
$array[$keyType->getValue()] = $valueType->getConstantScalarValues()[0];
4645
}
4746

4847
$args[] = $array;
4948
continue;
5049
}
51-
if (!$value instanceof ConstantScalarType) {
50+
if (count($value->getConstantScalarValues()) !== 1) {
5251
throw new DynamicQueryBuilderArgumentException();
5352
}
5453

55-
$args[] = $value->getValue();
54+
$args[] = $value->getConstantScalarValues()[0];
5655
}
5756

5857
return $args;

0 commit comments

Comments
 (0)