88use Generator ;
99use InvalidArgumentException ;
1010use Ruudk \CodeGenerator \CodeGenerator ;
11+ use Ruudk \CodeGenerator \FunctionName ;
1112use Ruudk \CodeGenerator \Group ;
1213use Symfony \Component \DependencyInjection \Argument \ArgumentInterface ;
1314use Symfony \Component \DependencyInjection \Argument \IteratorArgument ;
@@ -316,7 +317,7 @@ private function dumpReference(Reference $value) : Generator
316317 $ id = $ value instanceof TypedReference ? sprintf ('%s $%s ' , $ value , $ value ->getName ()) : (string ) $ value ;
317318
318319 $ call = $ this ->generator ->dumpFunctionCall (
319- $ this ->generator ->import (' function Symfony\Component\DependencyInjection\Loader\Configurator\service ' ),
320+ $ this ->generator ->import (new FunctionName ( ' Symfony\Component\DependencyInjection\Loader\Configurator\service ') ),
320321 [
321322 $ this ->export ($ id ),
322323 ],
@@ -382,7 +383,7 @@ private function dumpTaggedIterator(TaggedIteratorArgument $value, string $funct
382383 }
383384
384385 yield from $ this ->generator ->dumpFunctionCall (
385- $ this ->generator ->import (sprintf ('function Symfony\Component\DependencyInjection\Loader\Configurator\%s ' , $ function )),
386+ $ this ->generator ->import (new FunctionName ( sprintf ('Symfony\Component\DependencyInjection\Loader\Configurator\%s ' , $ function) )),
386387 $ args ,
387388 );
388389 }
@@ -393,7 +394,7 @@ private function dumpTaggedIterator(TaggedIteratorArgument $value, string $funct
393394 private function dumpIterator (IteratorArgument $ value ) : Generator
394395 {
395396 yield from $ this ->generator ->dumpFunctionCall (
396- $ this ->generator ->import (' function Symfony\Component\DependencyInjection\Loader\Configurator\iterator ' ),
397+ $ this ->generator ->import (new FunctionName ( ' Symfony\Component\DependencyInjection\Loader\Configurator\iterator ') ),
397398 [
398399 $ this ->export ($ value ->getValues ()),
399400 ],
@@ -406,7 +407,7 @@ private function dumpIterator(IteratorArgument $value) : Generator
406407 private function dumpEnv (string $ name ) : Generator
407408 {
408409 yield from $ this ->generator ->dumpFunctionCall (
409- $ this ->generator ->import (' function Symfony\Component\DependencyInjection\Loader\Configurator\env ' ),
410+ $ this ->generator ->import (new FunctionName ( ' Symfony\Component\DependencyInjection\Loader\Configurator\env ') ),
410411 $ this ->export ($ name ),
411412 );
412413 }
@@ -417,7 +418,7 @@ private function dumpEnv(string $name) : Generator
417418 private function dumpParam (string $ name ) : Generator
418419 {
419420 yield from $ this ->generator ->dumpFunctionCall (
420- $ this ->generator ->import (' function Symfony\Component\DependencyInjection\Loader\Configurator\param ' ),
421+ $ this ->generator ->import (new FunctionName ( ' Symfony\Component\DependencyInjection\Loader\Configurator\param ') ),
421422 $ this ->export ($ name ),
422423 );
423424 }
@@ -428,7 +429,7 @@ private function dumpParam(string $name) : Generator
428429 private function dumpServiceClosure (string $ value ) : Generator
429430 {
430431 yield from $ this ->generator ->dumpFunctionCall (
431- $ this ->generator ->import (' function Symfony\Component\DependencyInjection\Loader\Configurator\service_closure ' ),
432+ $ this ->generator ->import (new FunctionName ( ' Symfony\Component\DependencyInjection\Loader\Configurator\service_closure ') ),
432433 $ this ->export ($ value ),
433434 );
434435 }
@@ -445,7 +446,7 @@ private function dumpServiceLocator(ServiceLocatorArgument $input) : Generator
445446 }
446447
447448 yield from $ this ->generator ->dumpFunctionCall (
448- $ this ->generator ->import (' function Symfony\Component\DependencyInjection\Loader\Configurator\service_locator ' ),
449+ $ this ->generator ->import (new FunctionName ( ' Symfony\Component\DependencyInjection\Loader\Configurator\service_locator ') ),
449450 $ this ->export ($ input ->getValues ()),
450451 );
451452 }
@@ -456,7 +457,7 @@ private function dumpServiceLocator(ServiceLocatorArgument $input) : Generator
456457 private function dumpInlineService (Definition $ service ) : Generator
457458 {
458459 $ call = $ this ->generator ->dumpFunctionCall (
459- $ this ->generator ->import (' function Symfony\Component\DependencyInjection\Loader\Configurator\inline_service ' ),
460+ $ this ->generator ->import (new FunctionName ( ' Symfony\Component\DependencyInjection\Loader\Configurator\inline_service ') ),
460461 $ this ->export ($ service ->getClass ()),
461462 );
462463
@@ -510,7 +511,7 @@ private function dumpInlineService(Definition $service) : Generator
510511 private function dumpExpression (Expression $ expression ) : Generator
511512 {
512513 yield from $ this ->generator ->dumpFunctionCall (
513- $ this ->generator ->import (' function Symfony\Component\DependencyInjection\Loader\Configurator\expr ' ),
514+ $ this ->generator ->import (new FunctionName ( ' Symfony\Component\DependencyInjection\Loader\Configurator\expr ') ),
514515 $ this ->export ((string ) $ expression ),
515516 );
516517 }
0 commit comments