@@ -273,13 +273,12 @@ private function addProxyClasses()
273
273
/**
274
274
* Generates the require_once statement for service includes.
275
275
*
276
- * @param string $id
277
276
* @param Definition $definition
278
277
* @param array $inlinedDefinitions
279
278
*
280
279
* @return string
281
280
*/
282
- private function addServiceInclude ($ id , Definition $ definition , array $ inlinedDefinitions )
281
+ private function addServiceInclude (Definition $ definition , array $ inlinedDefinitions )
283
282
{
284
283
$ template = " require_once %s; \n" ;
285
284
$ code = '' ;
@@ -353,9 +352,9 @@ private function addServiceInlinedDefinitions($id, array $inlinedDefinitions)
353
352
$ code .= $ this ->addNewInstance ($ sDefinition , '$ ' .$ name , ' = ' , $ id );
354
353
355
354
if (!$ this ->hasReference ($ id , $ sDefinition ->getMethodCalls (), true ) && !$ this ->hasReference ($ id , $ sDefinition ->getProperties (), true )) {
356
- $ code .= $ this ->addServiceProperties (null , $ sDefinition , $ name );
357
- $ code .= $ this ->addServiceMethodCalls (null , $ sDefinition , $ name );
358
- $ code .= $ this ->addServiceConfigurator (null , $ sDefinition , $ name );
355
+ $ code .= $ this ->addServiceProperties ($ sDefinition , $ name );
356
+ $ code .= $ this ->addServiceMethodCalls ($ sDefinition , $ name );
357
+ $ code .= $ this ->addServiceConfigurator ($ sDefinition , $ name );
359
358
}
360
359
361
360
$ code .= "\n" ;
@@ -453,13 +452,12 @@ private function isSimpleInstance($id, Definition $definition)
453
452
/**
454
453
* Adds method calls to a service definition.
455
454
*
456
- * @param string $id
457
455
* @param Definition $definition
458
456
* @param string $variableName
459
457
*
460
458
* @return string
461
459
*/
462
- private function addServiceMethodCalls ($ id , Definition $ definition , $ variableName = 'instance ' )
460
+ private function addServiceMethodCalls (Definition $ definition , $ variableName = 'instance ' )
463
461
{
464
462
$ calls = '' ;
465
463
foreach ($ definition ->getMethodCalls () as $ call ) {
@@ -474,7 +472,7 @@ private function addServiceMethodCalls($id, Definition $definition, $variableNam
474
472
return $ calls ;
475
473
}
476
474
477
- private function addServiceProperties ($ id , Definition $ definition , $ variableName = 'instance ' )
475
+ private function addServiceProperties (Definition $ definition , $ variableName = 'instance ' )
478
476
{
479
477
$ code = '' ;
480
478
foreach ($ definition ->getProperties () as $ name => $ value ) {
@@ -518,9 +516,9 @@ private function addServiceInlinedDefinitionsSetup($id, array $inlinedDefinition
518
516
}
519
517
520
518
$ name = (string ) $ this ->definitionVariables ->offsetGet ($ iDefinition );
521
- $ code .= $ this ->addServiceProperties (null , $ iDefinition , $ name );
522
- $ code .= $ this ->addServiceMethodCalls (null , $ iDefinition , $ name );
523
- $ code .= $ this ->addServiceConfigurator (null , $ iDefinition , $ name );
519
+ $ code .= $ this ->addServiceProperties ($ iDefinition , $ name );
520
+ $ code .= $ this ->addServiceMethodCalls ($ iDefinition , $ name );
521
+ $ code .= $ this ->addServiceConfigurator ($ iDefinition , $ name );
524
522
}
525
523
526
524
if ('' !== $ code ) {
@@ -533,13 +531,12 @@ private function addServiceInlinedDefinitionsSetup($id, array $inlinedDefinition
533
531
/**
534
532
* Adds configurator definition.
535
533
*
536
- * @param string $id
537
534
* @param Definition $definition
538
535
* @param string $variableName
539
536
*
540
537
* @return string
541
538
*/
542
- private function addServiceConfigurator ($ id , Definition $ definition , $ variableName = 'instance ' )
539
+ private function addServiceConfigurator (Definition $ definition , $ variableName = 'instance ' )
543
540
{
544
541
if (!$ callable = $ definition ->getConfigurator ()) {
545
542
return '' ;
@@ -649,14 +646,14 @@ private function addService($id, Definition $definition)
649
646
$ isSimpleInstance = $ this ->isSimpleInstance ($ id , $ definition , $ inlinedDefinitions );
650
647
651
648
$ code .=
652
- $ this ->addServiceInclude ($ id , $ definition , $ inlinedDefinitions ).
649
+ $ this ->addServiceInclude ($ definition , $ inlinedDefinitions ).
653
650
$ this ->addServiceLocalTempVariables ($ id , $ definition , $ inlinedDefinitions ).
654
651
$ this ->addServiceInlinedDefinitions ($ id , $ inlinedDefinitions ).
655
652
$ this ->addServiceInstance ($ id , $ definition , $ isSimpleInstance ).
656
653
$ this ->addServiceInlinedDefinitionsSetup ($ id , $ inlinedDefinitions , $ isSimpleInstance ).
657
- $ this ->addServiceProperties ($ id , $ definition ).
658
- $ this ->addServiceMethodCalls ($ id , $ definition ).
659
- $ this ->addServiceConfigurator ($ id , $ definition ).
654
+ $ this ->addServiceProperties ($ definition ).
655
+ $ this ->addServiceMethodCalls ($ definition ).
656
+ $ this ->addServiceConfigurator ($ definition ).
660
657
$ this ->addServiceReturn ($ id , $ isSimpleInstance )
661
658
;
662
659
0 commit comments