@@ -568,7 +568,7 @@ private function addServiceInclude(string $cId, Definition $definition): string
568
568
}
569
569
}
570
570
571
- foreach ($ this ->serviceCalls as $ id => list ( $ callCount , $ behavior) ) {
571
+ foreach ($ this ->serviceCalls as $ id => [ $ callCount , $ behavior] ) {
572
572
if ('service_container ' !== $ id && $ id !== $ cId
573
573
&& ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE !== $ behavior
574
574
&& $ this ->container ->has ($ id )
@@ -878,7 +878,7 @@ private function addInlineReference(string $id, Definition $definition, string $
878
878
$ targetId = (string ) $ this ->container ->getAlias ($ targetId );
879
879
}
880
880
881
- list ( $ callCount , $ behavior) = $ this ->serviceCalls [$ targetId ];
881
+ [ $ callCount , $ behavior] = $ this ->serviceCalls [$ targetId ];
882
882
883
883
if ($ id === $ targetId ) {
884
884
return $ this ->addInlineService ($ id , $ definition , $ definition );
@@ -934,7 +934,7 @@ private function addInlineService(string $id, Definition $definition, Definition
934
934
$ code = '' ;
935
935
936
936
if ($ isSimpleInstance = $ isRootInstance = null === $ inlineDef ) {
937
- foreach ($ this ->serviceCalls as $ targetId => list ( $ callCount , $ behavior , $ byConstructor) ) {
937
+ foreach ($ this ->serviceCalls as $ targetId => [ $ callCount , $ behavior , $ byConstructor] ) {
938
938
if ($ byConstructor && isset ($ this ->circularReferences [$ id ][$ targetId ]) && !$ this ->circularReferences [$ id ][$ targetId ]) {
939
939
$ code .= $ this ->addInlineReference ($ id , $ definition , $ targetId , $ forConstructor );
940
940
}
@@ -1004,7 +1004,7 @@ private function addServices(array &$services = null): string
1004
1004
}
1005
1005
1006
1006
foreach ($ definitions as $ id => $ definition ) {
1007
- if (!(list ( $ file , $ code) = $ services [$ id ]) || null !== $ file ) {
1007
+ if (!([ $ file , $ code] = $ services [$ id ]) || null !== $ file ) {
1008
1008
continue ;
1009
1009
}
1010
1010
if ($ definition ->isPublic ()) {
@@ -1022,7 +1022,7 @@ private function generateServiceFiles(array $services): iterable
1022
1022
$ definitions = $ this ->container ->getDefinitions ();
1023
1023
ksort ($ definitions );
1024
1024
foreach ($ definitions as $ id => $ definition ) {
1025
- if ((list ( $ file , $ code) = $ services [$ id ]) && null !== $ file && ($ definition ->isPublic () || !$ this ->isTrivialInstance ($ definition ) || isset ($ this ->locatedIds [$ id ]))) {
1025
+ if (([ $ file , $ code] = $ services [$ id ]) && null !== $ file && ($ definition ->isPublic () || !$ this ->isTrivialInstance ($ definition ) || isset ($ this ->locatedIds [$ id ]))) {
1026
1026
if (!$ definition ->isShared ()) {
1027
1027
$ i = strpos ($ code , "\n\ninclude_once " );
1028
1028
if (false !== $ i && false !== $ i = strpos ($ code , "\n\n" , 2 + $ i )) {
@@ -1732,7 +1732,7 @@ private function dumpValue($value, bool $interpolate = true): string
1732
1732
return sprintf ('new \%s($this->getService, [%s%s], [%s%s]) ' , ServiceLocator::class, $ serviceMap , $ serviceMap ? "\n " : '' , $ serviceTypes , $ serviceTypes ? "\n " : '' );
1733
1733
}
1734
1734
} finally {
1735
- list ( $ this ->definitionVariables , $ this ->referenceVariables ) = $ scope ;
1735
+ [ $ this ->definitionVariables , $ this ->referenceVariables ] = $ scope ;
1736
1736
}
1737
1737
} elseif ($ value instanceof Definition) {
1738
1738
if ($ value ->hasErrors () && $ e = $ value ->getErrors ()) {
0 commit comments