File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -162,26 +162,28 @@ public static function selectFromArgs(
162162 if (count ($ args ) >= 2 && (bool ) $ args [1 ]->getAttribute (CurlSetOptArrayArgVisitor::ATTRIBUTE_NAME )) {
163163 $ optArrayType = $ scope ->getType ($ args [1 ]->value );
164164
165+ $ hasTypes = false ;
165166 $ builder = ConstantArrayTypeBuilder::createEmpty ();
166167 foreach ($ optArrayType ->getIterableKeyType ()->getConstantScalarValues () as $ optValue ) {
167168 if (!is_int ($ optValue )) {
168- $ builder = null ;
169+ $ hasTypes = false ;
169170 break ;
170171 }
171172
172173 $ optValueType = self ::getCurlOptValueType ($ optValue );
173174 if ($ optValueType === null ) {
174- $ builder = null ;
175+ $ hasTypes = false ;
175176 break ;
176177 }
177178
179+ $ hasTypes = true ;
178180 $ builder ->setOffsetValueType (
179181 new ConstantIntegerType ($ optValue ),
180182 $ optValueType ,
181183 );
182184 }
183185
184- if ($ builder !== null ) {
186+ if ($ hasTypes ) {
185187 $ acceptor = $ parametersAcceptors [0 ];
186188 $ parameters = $ acceptor ->getParameters ();
187189
You can’t perform that action at this time.
0 commit comments