@@ -16,11 +16,11 @@ final class DefinitionDecoratesConstraint extends Constraint
16
16
ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE => 'IGNORE_ON_UNINITIALIZED_REFERENCE ' ,
17
17
];
18
18
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 ;
24
24
25
25
public function __construct (string $ serviceId , string $ decoratedServiceId , ?string $ renamedId = null , int $ priority = 0 , ?int $ invalidBehavior = null )
26
26
{
@@ -62,7 +62,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
62
62
}
63
63
64
64
$ this ->fail (
65
- $ containerBuilder ,
65
+ $ this -> serviceId ,
66
66
sprintf (
67
67
'The container builder has no service "%s" ' ,
68
68
$ this ->serviceId
@@ -80,7 +80,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
80
80
}
81
81
82
82
$ this ->fail (
83
- $ containerBuilder ,
83
+ $ this -> serviceId ,
84
84
sprintf (
85
85
'The container builder has a service "%s", but it does not decorate any service ' ,
86
86
$ this ->serviceId
@@ -94,7 +94,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
94
94
}
95
95
96
96
$ this ->fail (
97
- $ containerBuilder ,
97
+ $ this -> serviceId ,
98
98
sprintf (
99
99
'The container builder has a decorator service "%s", but it does decorate service "%s". ' ,
100
100
$ this ->serviceId ,
@@ -109,7 +109,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
109
109
}
110
110
111
111
$ this ->fail (
112
- $ containerBuilder ,
112
+ $ this -> serviceId ,
113
113
sprintf (
114
114
'The container builder has a decorator service "%s", but it does not rename decorated service to "%s". ' ,
115
115
$ this ->serviceId ,
@@ -124,7 +124,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
124
124
}
125
125
126
126
$ this ->fail (
127
- $ containerBuilder ,
127
+ $ this -> serviceId ,
128
128
sprintf (
129
129
'The container builder has a decorator service "%s", but it does not decorate at expected "%d" priority. ' ,
130
130
$ this ->serviceId ,
@@ -139,7 +139,7 @@ private function evaluateServiceDefinition(ContainerBuilder $containerBuilder, b
139
139
}
140
140
141
141
$ this ->fail (
142
- $ containerBuilder ,
142
+ $ this -> serviceId ,
143
143
sprintf (
144
144
'The container builder has a decorator service "%s", but it does not decorate with expected "%s" behavior. ' ,
145
145
$ this ->serviceId ,
0 commit comments