@@ -814,7 +814,7 @@ private function addServiceConfigurator(Definition $definition, string $variable
814
814
815
815
if (\is_array ($ callable )) {
816
816
if ($ callable [0 ] instanceof Reference
817
- || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->contains ($ callable [0 ]))
817
+ || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->offsetExists ($ callable [0 ]))
818
818
) {
819
819
return \sprintf (" %s->%s( \$%s); \n" , $ this ->dumpValue ($ callable [0 ]), $ callable [1 ], $ variableName );
820
820
}
@@ -1205,15 +1205,15 @@ private function addNewInstance(Definition $definition, string $return = '', ?st
1205
1205
1206
1206
if (['... ' ] === $ arguments && ('Closure ' !== ($ class = $ definition ->getClass () ?: 'Closure ' ) || $ definition ->isLazy () && (
1207
1207
$ callable [0 ] instanceof Reference
1208
- || ($ callable [0 ] instanceof Definition && !$ this ->definitionVariables ->contains ($ callable [0 ]))
1208
+ || ($ callable [0 ] instanceof Definition && !$ this ->definitionVariables ->offsetExists ($ callable [0 ]))
1209
1209
))) {
1210
1210
$ initializer = 'fn () => ' .$ this ->dumpValue ($ callable [0 ]);
1211
1211
1212
1212
return $ return .LazyClosure::getCode ($ initializer , $ callable , $ class , $ this ->container , $ id ).$ tail ;
1213
1213
}
1214
1214
1215
1215
if ($ callable [0 ] instanceof Reference
1216
- || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->contains ($ callable [0 ]))
1216
+ || ($ callable [0 ] instanceof Definition && $ this ->definitionVariables ->offsetExists ($ callable [0 ]))
1217
1217
) {
1218
1218
return $ return .\sprintf ('%s->%s(%s) ' , $ this ->dumpValue ($ callable [0 ]), $ callable [1 ], $ arguments ? implode (', ' , $ arguments ) : '' ).$ tail ;
1219
1219
}
@@ -1920,7 +1920,7 @@ private function dumpValue(mixed $value, bool $interpolate = true): string
1920
1920
if ($ value ->hasErrors () && $ e = $ value ->getErrors ()) {
1921
1921
return \sprintf ('throw new RuntimeException(%s) ' , $ this ->export (reset ($ e )));
1922
1922
}
1923
- if ($ this ->definitionVariables ?->contains ($ value )) {
1923
+ if ($ this ->definitionVariables ?->offsetExists ($ value )) {
1924
1924
return $ this ->dumpValue ($ this ->definitionVariables [$ value ], $ interpolate );
1925
1925
}
1926
1926
if ($ value ->getMethodCalls ()) {
0 commit comments