@@ -255,12 +255,11 @@ private function addProxyClasses()
255
255
/**
256
256
* Generates the require_once statement for service includes.
257
257
*
258
- * @param string $id The service id
259
258
* @param Definition $definition
260
259
*
261
260
* @return string
262
261
*/
263
- private function addServiceInclude ($ id , $ definition )
262
+ private function addServiceInclude ($ definition )
264
263
{
265
264
$ template = " require_once %s; \n" ;
266
265
$ code = '' ;
@@ -335,9 +334,9 @@ private function addServiceInlinedDefinitions($id, $definition)
335
334
$ code .= $ this ->addNewInstance ($ id , $ sDefinition , '$ ' .$ name , ' = ' );
336
335
337
336
if (!$ this ->hasReference ($ id , $ sDefinition ->getMethodCalls (), true ) && !$ this ->hasReference ($ id , $ sDefinition ->getProperties (), true )) {
338
- $ code .= $ this ->addServiceProperties (null , $ sDefinition , $ name );
339
- $ code .= $ this ->addServiceMethodCalls (null , $ sDefinition , $ name );
340
- $ code .= $ this ->addServiceConfigurator (null , $ sDefinition , $ name );
337
+ $ code .= $ this ->addServiceProperties ($ sDefinition , $ name );
338
+ $ code .= $ this ->addServiceMethodCalls ($ sDefinition , $ name );
339
+ $ code .= $ this ->addServiceConfigurator ($ sDefinition , $ name );
341
340
}
342
341
343
342
$ code .= "\n" ;
@@ -437,13 +436,12 @@ private function isSimpleInstance($id, Definition $definition)
437
436
/**
438
437
* Adds method calls to a service definition.
439
438
*
440
- * @param string $id
441
439
* @param Definition $definition
442
440
* @param string $variableName
443
441
*
444
442
* @return string
445
443
*/
446
- private function addServiceMethodCalls ($ id , Definition $ definition , $ variableName = 'instance ' )
444
+ private function addServiceMethodCalls (Definition $ definition , $ variableName = 'instance ' )
447
445
{
448
446
$ calls = '' ;
449
447
foreach ($ definition ->getMethodCalls () as $ call ) {
@@ -458,7 +456,7 @@ private function addServiceMethodCalls($id, Definition $definition, $variableNam
458
456
return $ calls ;
459
457
}
460
458
461
- private function addServiceProperties ($ id , Definition $ definition , $ variableName = 'instance ' )
459
+ private function addServiceProperties (Definition $ definition , $ variableName = 'instance ' )
462
460
{
463
461
$ code = '' ;
464
462
foreach ($ definition ->getProperties () as $ name => $ value ) {
@@ -501,9 +499,9 @@ private function addServiceInlinedDefinitionsSetup($id, Definition $definition)
501
499
}
502
500
503
501
$ name = (string ) $ this ->definitionVariables ->offsetGet ($ iDefinition );
504
- $ code .= $ this ->addServiceProperties (null , $ iDefinition , $ name );
505
- $ code .= $ this ->addServiceMethodCalls (null , $ iDefinition , $ name );
506
- $ code .= $ this ->addServiceConfigurator (null , $ iDefinition , $ name );
502
+ $ code .= $ this ->addServiceProperties ($ iDefinition , $ name );
503
+ $ code .= $ this ->addServiceMethodCalls ($ iDefinition , $ name );
504
+ $ code .= $ this ->addServiceConfigurator ($ iDefinition , $ name );
507
505
}
508
506
509
507
if ('' !== $ code ) {
@@ -516,13 +514,12 @@ private function addServiceInlinedDefinitionsSetup($id, Definition $definition)
516
514
/**
517
515
* Adds configurator definition.
518
516
*
519
- * @param string $id
520
517
* @param Definition $definition
521
518
* @param string $variableName
522
519
*
523
520
* @return string
524
521
*/
525
- private function addServiceConfigurator ($ id , Definition $ definition , $ variableName = 'instance ' )
522
+ private function addServiceConfigurator (Definition $ definition , $ variableName = 'instance ' )
526
523
{
527
524
if (!$ callable = $ definition ->getConfigurator ()) {
528
525
return '' ;
@@ -633,14 +630,14 @@ private function addService($id, Definition $definition)
633
630
$ code .= sprintf (" throw new RuntimeException('You have requested a synthetic service ( \"%s \"). The DIC does not know how to construct this service.'); \n } \n" , $ id );
634
631
} else {
635
632
$ code .=
636
- $ this ->addServiceInclude ($ id , $ definition ).
633
+ $ this ->addServiceInclude ($ definition ).
637
634
$ this ->addServiceLocalTempVariables ($ id , $ definition ).
638
635
$ this ->addServiceInlinedDefinitions ($ id , $ definition ).
639
636
$ this ->addServiceInstance ($ id , $ definition ).
640
637
$ this ->addServiceInlinedDefinitionsSetup ($ id , $ definition ).
641
- $ this ->addServiceProperties ($ id , $ definition ).
642
- $ this ->addServiceMethodCalls ($ id , $ definition ).
643
- $ this ->addServiceConfigurator ($ id , $ definition ).
638
+ $ this ->addServiceProperties ($ definition ).
639
+ $ this ->addServiceMethodCalls ($ definition ).
640
+ $ this ->addServiceConfigurator ($ definition ).
644
641
$ this ->addServiceReturn ($ id , $ definition )
645
642
;
646
643
}
0 commit comments