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(
162
162
if (count ($ args ) >= 2 && (bool ) $ args [1 ]->getAttribute (CurlSetOptArrayArgVisitor::ATTRIBUTE_NAME )) {
163
163
$ optArrayType = $ scope ->getType ($ args [1 ]->value );
164
164
165
+ $ hasTypes = false ;
165
166
$ builder = ConstantArrayTypeBuilder::createEmpty ();
166
167
foreach ($ optArrayType ->getIterableKeyType ()->getConstantScalarValues () as $ optValue ) {
167
168
if (!is_int ($ optValue )) {
168
- $ builder = null ;
169
+ $ hasTypes = false ;
169
170
break ;
170
171
}
171
172
172
173
$ optValueType = self ::getCurlOptValueType ($ optValue );
173
174
if ($ optValueType === null ) {
174
- $ builder = null ;
175
+ $ hasTypes = false ;
175
176
break ;
176
177
}
177
178
179
+ $ hasTypes = true ;
178
180
$ builder ->setOffsetValueType (
179
181
new ConstantIntegerType ($ optValue ),
180
182
$ optValueType ,
181
183
);
182
184
}
183
185
184
- if ($ builder !== null ) {
186
+ if ($ hasTypes ) {
185
187
$ acceptor = $ parametersAcceptors [0 ];
186
188
$ parameters = $ acceptor ->getParameters ();
187
189
You can’t perform that action at this time.
0 commit comments