@@ -799,7 +799,7 @@ private function addServiceConfigurator(Definition $definition, string $variable
799
799
800
800
if (\is_array ($ callable )) {
801
801
if ($ callable [0 ] instanceof Reference
802
- || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->contains ($ callable [0 ]))
802
+ || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->offsetExists ($ callable [0 ]))
803
803
) {
804
804
return \sprintf (" %s->%s( \$%s); \n" , $ this ->dumpValue ($ callable [0 ]), $ callable [1 ], $ variableName );
805
805
}
@@ -1187,15 +1187,15 @@ private function addNewInstance(Definition $definition, string $return = '', ?st
1187
1187
1188
1188
if (['... ' ] === $ arguments && ('Closure ' !== ($ class = $ definition ->getClass () ?: 'Closure ' ) || $ definition ->isLazy () && (
1189
1189
$ callable [0 ] instanceof Reference
1190
- || ($ callable [0 ] instanceof Definition && !$ this ->definitionVariables ->contains ($ callable [0 ]))
1190
+ || ($ callable [0 ] instanceof Definition && !$ this ->definitionVariables ->offsetExists ($ callable [0 ]))
1191
1191
))) {
1192
1192
$ initializer = 'fn () => ' .$ this ->dumpValue ($ callable [0 ]);
1193
1193
1194
1194
return $ return .LazyClosure::getCode ($ initializer , $ callable , $ class , $ this ->container , $ id ).$ tail ;
1195
1195
}
1196
1196
1197
1197
if ($ callable [0 ] instanceof Reference
1198
- || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->contains ($ callable [0 ]))
1198
+ || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->offsetExists ($ callable [0 ]))
1199
1199
) {
1200
1200
return $ return .\sprintf ('%s->%s(%s) ' , $ this ->dumpValue ($ callable [0 ]), $ callable [1 ], $ arguments ? implode (', ' , $ arguments ) : '' ).$ tail ;
1201
1201
}
@@ -1937,7 +1937,7 @@ private function dumpValue(mixed $value, bool $interpolate = true): string
1937
1937
if ($ value ->hasErrors () && $ e = $ value ->getErrors ()) {
1938
1938
return \sprintf ('throw new RuntimeException(%s) ' , $ this ->export (reset ($ e )));
1939
1939
}
1940
- if ($ this ->definitionVariables ?->contains ($ value )) {
1940
+ if ($ this ->definitionVariables ?->offsetExists ($ value )) {
1941
1941
return $ this ->dumpValue ($ this ->definitionVariables [$ value ], $ interpolate );
1942
1942
}
1943
1943
if ($ value ->getMethodCalls ()) {
0 commit comments