@@ -114,7 +114,7 @@ public function testNormalizerReturnsInvalidType()
114114 $ resolver = new OptionsResolver ();
115115 $ resolver ->setDefaults (['foo ' => 'bar ' ]);
116116 $ resolver ->setAllowedTypes ('foo ' , ['string ' ]);
117- $ resolver ->setNormalizer ('foo ' , function ($ value ) {
117+ $ resolver ->setNormalizer ('foo ' , static function ($ value ) {
118118 return 8 ;
119119 });
120120 $ result = $ resolver ->resolve (['foo ' => 'test ' ]);
@@ -126,7 +126,7 @@ public function testNormalizerReturnsInvalidValue()
126126 $ resolver = new OptionsResolver ();
127127 $ resolver ->setDefaults (['foo ' => 'b ' ]);
128128 $ resolver ->setAllowedValues ('foo ' , ['a ' , 'b ' , 'c ' ]);
129- $ resolver ->setNormalizer ('foo ' , function ($ value ) {
129+ $ resolver ->setNormalizer ('foo ' , static function ($ value ) {
130130 return 'z ' ;
131131 });
132132 $ result = $ resolver ->resolve (['foo ' => 'a ' ]);
@@ -138,7 +138,7 @@ public function testNormalizerResultFailsValidation()
138138 $ resolver = new OptionsResolver ();
139139 $ resolver ->setDefaults (['foo ' => 'b ' ]);
140140 $ resolver ->setAllowedValues ('foo ' , ['a ' , 'b ' , 'c ' ]);
141- $ resolver ->setNormalizer ('foo ' , function ($ value ) {
141+ $ resolver ->setNormalizer ('foo ' , static function ($ value ) {
142142 return false ;
143143 });
144144 $ result = $ resolver ->resolve (['foo ' => 'a ' ]);
@@ -237,7 +237,7 @@ public function allowedValueTestProvider(): \Generator
237237 yield 'Callback validates successfully ' => [
238238 ['count ' => 50 ],
239239 ['count ' => 10 ],
240- ['count ' => function ($ value ) {
240+ ['count ' => static function ($ value ) {
241241 return $ value >= 0 && $ value <= 100 ;
242242 }],
243243 ['count ' => 10 ],
@@ -246,7 +246,7 @@ public function allowedValueTestProvider(): \Generator
246246 yield 'Callback validation fails ' => [
247247 ['count ' => 50 ],
248248 ['count ' => 200 ],
249- ['count ' => function ($ value ) {
249+ ['count ' => static function ($ value ) {
250250 return $ value >= 0 && $ value <= 100 ;
251251 }],
252252 ['count ' => 50 ],
@@ -281,7 +281,7 @@ public function normalizerTestProvider(): \Generator
281281 yield 'Normalizes successful ' => [
282282 ['a ' => 'b ' ],
283283 ['a ' => ' c ' ],
284- ['a ' => function ($ value ) {
284+ ['a ' => static function ($ value ) {
285285 return trim ($ value );
286286 }],
287287 ['a ' => 'c ' ],
0 commit comments