File tree Expand file tree Collapse file tree
rules/Arguments/Rector/ClassMethod Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -352,18 +352,14 @@ private function processStaticCall(
352352 }
353353
354354 // Handle named arguments case - add as named argument at the end
355+ $ arg = new Arg (new Variable ($ argumentName ));
355356 if ($ this ->argsAnalyzer ->hasNamedArg ($ staticCall ->getArgs ())) {
356- $ arg = new Arg (new Variable ($ argumentName ));
357357 $ arg ->name = new Identifier ($ argumentName );
358- $ staticCall ->args [] = $ arg ;
359- $ this ->hasChanged = true ;
360- return ;
358+ } else {
359+ $ this ->fillGapBetweenWithDefaultValue ($ staticCall , $ position );
361360 }
362361
363- // Original positional logic
364- $ this ->fillGapBetweenWithDefaultValue ($ staticCall , $ position );
365-
366- $ staticCall ->args [$ position ] = new Arg (new Variable ($ argumentName ));
362+ $ staticCall ->args [] = $ arg ;
367363 $ this ->hasChanged = true ;
368364 }
369365
You can’t perform that action at this time.
0 commit comments