File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 55use PhpParser \Node \Arg ;
66use PHPStan \Analyser \Scope ;
77use PHPStan \Rules \Doctrine \ORM \DynamicQueryBuilderArgumentException ;
8- use PHPStan \Type \ConstantScalarType ;
98use PHPStan \Type \Doctrine \QueryBuilder \Expr \ExprType ;
109use function count ;
1110use 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 ;
You can’t perform that action at this time.
0 commit comments