@@ -126,13 +126,13 @@ public function testUncallableCallbacks($callbacks)
126126 $ normalizer ->normalize ($ obj , null , ['callbacks ' => $ callbacks ]);
127127 }
128128
129- public function provideNormalizeCallbacks ()
129+ public static function provideNormalizeCallbacks ()
130130 {
131131 return [
132132 'Change a string ' => [
133133 [
134134 'bar ' => function ($ bar ) {
135- $ this -> assertEquals ('baz ' , $ bar );
135+ static :: assertEquals ('baz ' , $ bar );
136136
137137 return 'baz ' ;
138138 },
@@ -143,11 +143,11 @@ public function provideNormalizeCallbacks()
143143 'Null an item ' => [
144144 [
145145 'bar ' => function ($ value , $ object , $ attributeName , $ format , $ context ) {
146- $ this -> assertSame ('baz ' , $ value );
147- $ this -> assertInstanceOf (CallbacksObject::class, $ object );
148- $ this -> assertSame ('bar ' , $ attributeName );
149- $ this -> assertSame ('any ' , $ format );
150- $ this -> assertArrayHasKey ('circular_reference_limit_counters ' , $ context );
146+ static :: assertSame ('baz ' , $ value );
147+ static :: assertInstanceOf (CallbacksObject::class, $ object );
148+ static :: assertSame ('bar ' , $ attributeName );
149+ static :: assertSame ('any ' , $ format );
150+ static :: assertArrayHasKey ('circular_reference_limit_counters ' , $ context );
151151 },
152152 ],
153153 'baz ' ,
@@ -156,7 +156,7 @@ public function provideNormalizeCallbacks()
156156 'Format a date ' => [
157157 [
158158 'bar ' => function ($ bar ) {
159- $ this -> assertInstanceOf (\DateTime::class, $ bar );
159+ static :: assertInstanceOf (\DateTime::class, $ bar );
160160
161161 return $ bar ->format ('d-m-Y H:i:s ' );
162162 },
@@ -190,13 +190,13 @@ public function provideNormalizeCallbacks()
190190 ];
191191 }
192192
193- public function provideDenormalizeCallbacks (): array
193+ public static function provideDenormalizeCallbacks (): array
194194 {
195195 return [
196196 'Change a string ' => [
197197 [
198198 'bar ' => function ($ bar ) {
199- $ this -> assertEquals ('bar ' , $ bar );
199+ static :: assertEquals ('bar ' , $ bar );
200200
201201 return $ bar ;
202202 },
@@ -207,11 +207,11 @@ public function provideDenormalizeCallbacks(): array
207207 'Null an item ' => [
208208 [
209209 'bar ' => function ($ value , $ object , $ attributeName , $ format , $ context ) {
210- $ this -> assertSame ('baz ' , $ value );
211- $ this -> assertTrue (is_a ($ object , CallbacksObject::class, true ));
212- $ this -> assertSame ('bar ' , $ attributeName );
213- $ this -> assertSame ('any ' , $ format );
214- $ this -> assertIsArray ($ context );
210+ static :: assertSame ('baz ' , $ value );
211+ static :: assertTrue (is_a ($ object , CallbacksObject::class, true ));
212+ static :: assertSame ('bar ' , $ attributeName );
213+ static :: assertSame ('any ' , $ format );
214+ static :: assertIsArray ($ context );
215215 },
216216 ],
217217 'baz ' ,
@@ -220,7 +220,7 @@ public function provideDenormalizeCallbacks(): array
220220 'Format a date ' => [
221221 [
222222 'bar ' => function ($ bar ) {
223- $ this -> assertIsString ($ bar );
223+ static :: assertIsString ($ bar );
224224
225225 return \DateTime::createFromFormat ('d-m-Y H:i:s ' , $ bar );
226226 },
@@ -254,13 +254,13 @@ public function provideDenormalizeCallbacks(): array
254254 ];
255255 }
256256
257- public function providerDenormalizeCallbacksWithTypedProperty (): array
257+ public static function providerDenormalizeCallbacksWithTypedProperty (): array
258258 {
259259 return [
260260 'Change a typed string ' => [
261261 [
262262 'foo ' => function ($ foo ) {
263- $ this -> assertEquals ('foo ' , $ foo );
263+ static :: assertEquals ('foo ' , $ foo );
264264
265265 return $ foo ;
266266 },
@@ -271,11 +271,11 @@ public function providerDenormalizeCallbacksWithTypedProperty(): array
271271 'Null an typed item ' => [
272272 [
273273 'foo ' => function ($ value , $ object , $ attributeName , $ format , $ context ) {
274- $ this -> assertSame ('fool ' , $ value );
275- $ this -> assertTrue (is_a ($ object , CallbacksObject::class, true ));
276- $ this -> assertSame ('foo ' , $ attributeName );
277- $ this -> assertSame ('any ' , $ format );
278- $ this -> assertIsArray ($ context );
274+ static :: assertSame ('fool ' , $ value );
275+ static :: assertTrue (is_a ($ object , CallbacksObject::class, true ));
276+ static :: assertSame ('foo ' , $ attributeName );
277+ static :: assertSame ('any ' , $ format );
278+ static :: assertIsArray ($ context );
279279 },
280280 ],
281281 'fool ' ,
@@ -284,7 +284,7 @@ public function providerDenormalizeCallbacksWithTypedProperty(): array
284284 ];
285285 }
286286
287- public function provideInvalidCallbacks ()
287+ public static function provideInvalidCallbacks ()
288288 {
289289 return [
290290 [['bar ' => null ]],
0 commit comments