@@ -267,12 +267,11 @@ private function addProxyClasses()
267
267
/**
268
268
* Generates the require_once statement for service includes.
269
269
*
270
- * @param string $id The service id
271
270
* @param Definition $definition
272
271
*
273
272
* @return string
274
273
*/
275
- private function addServiceInclude ($ id , $ definition )
274
+ private function addServiceInclude ($ definition )
276
275
{
277
276
$ template = " require_once %s; \n" ;
278
277
$ code = '' ;
@@ -347,9 +346,9 @@ private function addServiceInlinedDefinitions($id, $definition)
347
346
$ code .= $ this ->addNewInstance ($ sDefinition , '$ ' .$ name , ' = ' , $ id );
348
347
349
348
if (!$ this ->hasReference ($ id , $ sDefinition ->getMethodCalls (), true ) && !$ this ->hasReference ($ id , $ sDefinition ->getProperties (), true )) {
350
- $ code .= $ this ->addServiceProperties (null , $ sDefinition , $ name );
351
- $ code .= $ this ->addServiceMethodCalls (null , $ sDefinition , $ name );
352
- $ code .= $ this ->addServiceConfigurator (null , $ sDefinition , $ name );
349
+ $ code .= $ this ->addServiceProperties ($ sDefinition , $ name );
350
+ $ code .= $ this ->addServiceMethodCalls ($ sDefinition , $ name );
351
+ $ code .= $ this ->addServiceConfigurator ($ sDefinition , $ name );
353
352
}
354
353
355
354
$ code .= "\n" ;
@@ -447,13 +446,12 @@ private function isSimpleInstance($id, Definition $definition)
447
446
/**
448
447
* Adds method calls to a service definition.
449
448
*
450
- * @param string $id
451
449
* @param Definition $definition
452
450
* @param string $variableName
453
451
*
454
452
* @return string
455
453
*/
456
- private function addServiceMethodCalls ($ id , Definition $ definition , $ variableName = 'instance ' )
454
+ private function addServiceMethodCalls (Definition $ definition , $ variableName = 'instance ' )
457
455
{
458
456
$ calls = '' ;
459
457
foreach ($ definition ->getMethodCalls () as $ call ) {
@@ -468,7 +466,7 @@ private function addServiceMethodCalls($id, Definition $definition, $variableNam
468
466
return $ calls ;
469
467
}
470
468
471
- private function addServiceProperties ($ id , Definition $ definition , $ variableName = 'instance ' )
469
+ private function addServiceProperties (Definition $ definition , $ variableName = 'instance ' )
472
470
{
473
471
$ code = '' ;
474
472
foreach ($ definition ->getProperties () as $ name => $ value ) {
@@ -511,9 +509,9 @@ private function addServiceInlinedDefinitionsSetup($id, Definition $definition)
511
509
}
512
510
513
511
$ name = (string ) $ this ->definitionVariables ->offsetGet ($ iDefinition );
514
- $ code .= $ this ->addServiceProperties (null , $ iDefinition , $ name );
515
- $ code .= $ this ->addServiceMethodCalls (null , $ iDefinition , $ name );
516
- $ code .= $ this ->addServiceConfigurator (null , $ iDefinition , $ name );
512
+ $ code .= $ this ->addServiceProperties ($ iDefinition , $ name );
513
+ $ code .= $ this ->addServiceMethodCalls ($ iDefinition , $ name );
514
+ $ code .= $ this ->addServiceConfigurator ($ iDefinition , $ name );
517
515
}
518
516
519
517
if ('' !== $ code ) {
@@ -526,13 +524,12 @@ private function addServiceInlinedDefinitionsSetup($id, Definition $definition)
526
524
/**
527
525
* Adds configurator definition.
528
526
*
529
- * @param string $id
530
527
* @param Definition $definition
531
528
* @param string $variableName
532
529
*
533
530
* @return string
534
531
*/
535
- private function addServiceConfigurator ($ id , Definition $ definition , $ variableName = 'instance ' )
532
+ private function addServiceConfigurator (Definition $ definition , $ variableName = 'instance ' )
536
533
{
537
534
if (!$ callable = $ definition ->getConfigurator ()) {
538
535
return '' ;
@@ -641,14 +638,14 @@ private function addService($id, Definition $definition)
641
638
}
642
639
643
640
$ code .=
644
- $ this ->addServiceInclude ($ id , $ definition ).
641
+ $ this ->addServiceInclude ($ definition ).
645
642
$ this ->addServiceLocalTempVariables ($ id , $ definition ).
646
643
$ this ->addServiceInlinedDefinitions ($ id , $ definition ).
647
644
$ this ->addServiceInstance ($ id , $ definition ).
648
645
$ this ->addServiceInlinedDefinitionsSetup ($ id , $ definition ).
649
- $ this ->addServiceProperties ($ id , $ definition ).
650
- $ this ->addServiceMethodCalls ($ id , $ definition ).
651
- $ this ->addServiceConfigurator ($ id , $ definition ).
646
+ $ this ->addServiceProperties ($ definition ).
647
+ $ this ->addServiceMethodCalls ($ definition ).
648
+ $ this ->addServiceConfigurator ($ definition ).
652
649
$ this ->addServiceReturn ($ id , $ definition )
653
650
;
654
651
}
0 commit comments