@@ -16,11 +16,11 @@ final class DefinitionDecoratesConstraint extends Constraint
1616        ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE       => 'IGNORE_ON_UNINITIALIZED_REFERENCE ' ,
1717    ];
1818
19-     private  $ serviceId ;
20-     private  $ decoratedServiceId ;
21-     private  $ renamedId ;
22-     private  $ priority ;
23-     private  $ invalidBehavior ;
19+     private  string   $ serviceId ;
20+     private  string   $ decoratedServiceId ;
21+     private  ? string   $ renamedId ;
22+     private  int   $ priority ;
23+     private  ? int   $ invalidBehavior ;
2424
2525    public  function  __construct (string  $ serviceId , string  $ decoratedServiceId , ?string  $ renamedId  = null , int  $ priority  = 0 , ?int  $ invalidBehavior  = null )
2626    {
@@ -62,7 +62,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
6262            }
6363
6464            $ this  ->fail (
65-                 $ containerBuilder  ,
65+                 $ this -> serviceId ,
6666                sprintf (
6767                    'The container builder has no service "%s" ' ,
6868                    $ this  ->serviceId 
@@ -80,7 +80,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
8080            }
8181
8282            $ this  ->fail (
83-                 $ containerBuilder  ,
83+                 $ this -> serviceId ,
8484                sprintf (
8585                    'The container builder has a service "%s", but it does not decorate any service ' ,
8686                    $ this  ->serviceId 
@@ -94,7 +94,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
9494            }
9595
9696            $ this  ->fail (
97-                 $ containerBuilder  ,
97+                 $ this -> serviceId ,
9898                sprintf (
9999                    'The container builder has a decorator service "%s", but it does decorate service "%s". ' ,
100100                    $ this  ->serviceId ,
@@ -109,7 +109,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
109109            }
110110
111111            $ this  ->fail (
112-                 $ containerBuilder  ,
112+                 $ this -> serviceId ,
113113                sprintf (
114114                    'The container builder has a decorator service "%s", but it does not rename decorated service to "%s". ' ,
115115                    $ this  ->serviceId ,
@@ -124,7 +124,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
124124            }
125125
126126            $ this  ->fail (
127-                 $ containerBuilder  ,
127+                 $ this -> serviceId ,
128128                sprintf (
129129                    'The container builder has a decorator service "%s", but it does not decorate at expected "%d" priority. ' ,
130130                    $ this  ->serviceId ,
@@ -139,7 +139,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
139139            }
140140
141141            $ this  ->fail (
142-                 $ containerBuilder  ,
142+                 $ this -> serviceId ,
143143                sprintf (
144144                    'The container builder has a decorator service "%s", but it does not decorate with expected "%s" behavior. ' ,
145145                    $ this  ->serviceId ,
0 commit comments