@@ -76,7 +76,7 @@ public function __construct()
76
76
*/
77
77
protected function getBarService ()
78
78
{
79
- $ a = $ this ->get ('foo.baz ' );
79
+ $ a = $ {( $ _ = isset ( $ this ->services [ ' foo.baz ' ]) ? $ this -> services [ ' foo.baz ' ] : $ this -> get ('foo.baz ' )) && false ?: ' _ ' } ;
80
80
81
81
$ this ->services ['bar ' ] = $ instance = new \Bar \FooClass ('foo ' , $ a , $ this ->getParameter ('foo_bar ' ));
82
82
@@ -97,7 +97,7 @@ protected function getBazService()
97
97
{
98
98
$ this ->services ['baz ' ] = $ instance = new \Baz ();
99
99
100
- $ instance ->setFoo ($ this ->get ('foo_with_inline ' ));
100
+ $ instance ->setFoo ($ {( $ _ = isset ( $ this ->services [ ' foo_with_inline ' ]) ? $ this -> services [ ' foo_with_inline ' ] : $ this -> get ('foo_with_inline ' )) && false ?: ' _ ' } );
101
101
102
102
return $ instance ;
103
103
}
@@ -113,7 +113,7 @@ protected function getBazService()
113
113
protected function getClosureProxyService ()
114
114
{
115
115
return $ this ->services ['closure_proxy ' ] = new \BarClass (/** @closure-proxy BarClass::getBaz */ function () {
116
- return $ this ->get ('closure_proxy ' )->getBaz ();
116
+ return $ {( $ _ = isset ( $ this ->services [ ' closure_proxy ' ]) ? $ this -> services [ ' closure_proxy ' ] : $ this -> get ('closure_proxy ' )) && false ?: ' _ ' } ->getBaz ();
117
117
});
118
118
}
119
119
@@ -217,7 +217,7 @@ protected function getDeprecatedServiceService()
217
217
*/
218
218
protected function getFactoryServiceService ()
219
219
{
220
- return $ this ->services ['factory_service ' ] = $ this ->get ('foo.baz ' )->getInstance ();
220
+ return $ this ->services ['factory_service ' ] = $ {( $ _ = isset ( $ this ->services [ ' foo.baz ' ]) ? $ this -> services [ ' foo.baz ' ] : $ this -> get ('foo.baz ' )) && false ?: ' _ ' } ->getInstance ();
221
221
}
222
222
223
223
/**
@@ -243,14 +243,14 @@ protected function getFactoryServiceSimpleService()
243
243
*/
244
244
protected function getFooService ()
245
245
{
246
- $ a = $ this ->get ('foo.baz ' );
246
+ $ a = $ {( $ _ = isset ( $ this ->services [ ' foo.baz ' ]) ? $ this -> services [ ' foo.baz ' ] : $ this -> get ('foo.baz ' )) && false ?: ' _ ' } ;
247
247
248
248
$ this ->services ['foo ' ] = $ instance = \Bar \FooClass::getInstance ('foo ' , $ a , array ($ this ->getParameter ('foo ' ) => 'foo is ' .$ this ->getParameter ('foo ' ).'' , 'foobar ' => $ this ->getParameter ('foo ' )), true , $ this );
249
249
250
250
$ instance ->foo = 'bar ' ;
251
251
$ instance ->moo = $ a ;
252
252
$ instance ->qux = array ($ this ->getParameter ('foo ' ) => 'foo is ' .$ this ->getParameter ('foo ' ).'' , 'foobar ' => $ this ->getParameter ('foo ' ));
253
- $ instance ->setBar ($ this ->get ('bar ' ));
253
+ $ instance ->setBar ($ {( $ _ = isset ( $ this ->services [ ' bar ' ]) ? $ this -> services [ ' bar ' ] : $ this -> get ('bar ' )) && false ?: ' _ ' } );
254
254
$ instance ->initialize ();
255
255
sc_configure ($ instance );
256
256
@@ -315,7 +315,7 @@ protected function getLazyContextService()
315
315
{
316
316
return $ this ->services ['lazy_context ' ] = new \LazyContext (new RewindableGenerator (function () {
317
317
yield 0 => 'foo ' ;
318
- yield 1 => $ this ->get ('foo.baz ' );
318
+ yield 1 => $ {( $ _ = isset ( $ this ->services [ ' foo.baz ' ]) ? $ this -> services [ ' foo.baz ' ] : $ this -> get ('foo.baz ' )) && false ?: ' _ ' } ;
319
319
yield 2 => array ($ this ->getParameter ('foo ' ) => 'foo is ' .$ this ->getParameter ('foo ' ).'' , 'foobar ' => $ this ->getParameter ('foo ' ));
320
320
yield 3 => true ;
321
321
yield 4 => $ this ;
@@ -333,7 +333,7 @@ protected function getLazyContextService()
333
333
protected function getLazyContextIgnoreInvalidRefService ()
334
334
{
335
335
return $ this ->services ['lazy_context_ignore_invalid_ref ' ] = new \LazyContext (new RewindableGenerator (function () {
336
- yield 0 => $ this ->get ('foo.baz ' );
336
+ yield 0 => $ {( $ _ = isset ( $ this ->services [ ' foo.baz ' ]) ? $ this -> services [ ' foo.baz ' ] : $ this -> get ('foo.baz ' )) && false ?: ' _ ' } ;
337
337
if ($ this ->has ('invalid ' )) {
338
338
yield 1 => $ this ->get ('invalid ' , ContainerInterface::NULL_ON_INVALID_REFERENCE );
339
339
}
@@ -354,7 +354,7 @@ protected function getMethodCall1Service()
354
354
355
355
$ this ->services ['method_call1 ' ] = $ instance = new \Bar \FooClass ();
356
356
357
- $ instance ->setBar ($ this ->get ('foo ' ));
357
+ $ instance ->setBar ($ {( $ _ = isset ( $ this ->services [ ' foo ' ]) ? $ this -> services [ ' foo ' ] : $ this -> get ('foo ' )) && false ?: ' _ ' } );
358
358
$ instance ->setBar ($ this ->get ('foo2 ' , ContainerInterface::NULL_ON_INVALID_REFERENCE ));
359
359
if ($ this ->has ('foo3 ' )) {
360
360
$ instance ->setBar ($ this ->get ('foo3 ' , ContainerInterface::NULL_ON_INVALID_REFERENCE ));
@@ -426,7 +426,7 @@ protected function getConfiguratorServiceService()
426
426
{
427
427
$ this ->services ['configurator_service ' ] = $ instance = new \ConfClass ();
428
428
429
- $ instance ->setFoo ($ this ->get ('baz ' ));
429
+ $ instance ->setFoo ($ {( $ _ = isset ( $ this ->services [ ' baz ' ]) ? $ this -> services [ ' baz ' ] : $ this -> get ('baz ' )) && false ?: ' _ ' } );
430
430
431
431
return $ instance ;
432
432
}
@@ -482,7 +482,7 @@ protected function getInlinedService()
482
482
$ this ->services ['inlined ' ] = $ instance = new \Bar ();
483
483
484
484
$ instance ->pub = 'pub ' ;
485
- $ instance ->setBaz ($ this ->get ('baz ' ));
485
+ $ instance ->setBaz ($ {( $ _ = isset ( $ this ->services [ ' baz ' ]) ? $ this -> services [ ' baz ' ] : $ this -> get ('baz ' )) && false ?: ' _ ' } );
486
486
487
487
return $ instance ;
488
488
}
0 commit comments