@@ -54,7 +54,7 @@ public function testParsePhpConstants($yaml, $value)
54
54
$ this ->assertSame ($ value , $ actual );
55
55
}
56
56
57
- public function getTestsForParsePhpConstants ()
57
+ public static function getTestsForParsePhpConstants ()
58
58
{
59
59
return [
60
60
['!php/const Symfony\Component\Yaml\Yaml::PARSE_CONSTANT ' , Yaml::PARSE_CONSTANT ],
@@ -225,7 +225,7 @@ public function testParseReferences($yaml, $expected)
225
225
$ this ->assertSame ($ expected , Inline::parse ($ yaml , 0 , $ references ));
226
226
}
227
227
228
- public function getDataForParseReferences ()
228
+ public static function getDataForParseReferences ()
229
229
{
230
230
return [
231
231
'scalar ' => ['*var ' , 'var-value ' ],
@@ -275,7 +275,7 @@ public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
275
275
Inline::parse (sprintf ('{ foo: %sfoo } ' , $ indicator ));
276
276
}
277
277
278
- public function getReservedIndicators ()
278
+ public static function getReservedIndicators ()
279
279
{
280
280
return [['@ ' ], ['` ' ]];
281
281
}
@@ -291,7 +291,7 @@ public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)
291
291
Inline::parse (sprintf ('{ foo: %sfoo } ' , $ indicator ));
292
292
}
293
293
294
- public function getScalarIndicators ()
294
+ public static function getScalarIndicators ()
295
295
{
296
296
return [['| ' ], ['> ' ], ['% ' ]];
297
297
}
@@ -304,7 +304,7 @@ public function testIsHash($array, $expected)
304
304
$ this ->assertSame ($ expected , Inline::isHash ($ array ));
305
305
}
306
306
307
- public function getDataForIsHash ()
307
+ public static function getDataForIsHash ()
308
308
{
309
309
return [
310
310
[[], false ],
@@ -314,7 +314,7 @@ public function getDataForIsHash()
314
314
];
315
315
}
316
316
317
- public function getTestsForParse ()
317
+ public static function getTestsForParse ()
318
318
{
319
319
return [
320
320
['' , '' ],
@@ -400,7 +400,7 @@ public function getTestsForParse()
400
400
];
401
401
}
402
402
403
- public function getTestsForParseWithMapObjects ()
403
+ public static function getTestsForParseWithMapObjects ()
404
404
{
405
405
return [
406
406
['' , '' ],
@@ -481,7 +481,7 @@ public function getTestsForParseWithMapObjects()
481
481
];
482
482
}
483
483
484
- public function getTestsForDump ()
484
+ public static function getTestsForDump ()
485
485
{
486
486
return [
487
487
['null ' , null ],
@@ -584,7 +584,7 @@ public function testParseTimestampAsDateTimeObject(string $yaml, int $year, int
584
584
$ this ->assertSame ($ timezone , $ date ->format ('O ' ));
585
585
}
586
586
587
- public function getTimestampTests (): array
587
+ public static function getTimestampTests (): array
588
588
{
589
589
return [
590
590
'canonical ' => ['2001-12-15T02:59:43.1Z ' , 2001 , 12 , 15 , 2 , 59 , 43 , 100000 , '+0000 ' ],
@@ -626,7 +626,7 @@ public function testDumpNumericKeyAsString(array|int $input, int $flags, string
626
626
$ this ->assertSame ($ expected , Inline::dump ($ input , $ flags ));
627
627
}
628
628
629
- public function getNumericKeyData ()
629
+ public static function getNumericKeyData ()
630
630
{
631
631
yield 'Int with flag ' => [
632
632
200 ,
@@ -725,7 +725,7 @@ public function testParseBackedEnumValue()
725
725
$ this ->assertSame (FooBackedEnum::BAR ->value , Inline::parse ("!php/enum Symfony\Component\Yaml\Tests\Fixtures\FooBackedEnum::BAR->value " , Yaml::PARSE_CONSTANT ));
726
726
}
727
727
728
- public function getDateTimeDumpTests ()
728
+ public static function getDateTimeDumpTests ()
729
729
{
730
730
$ tests = [];
731
731
@@ -746,7 +746,7 @@ public function testParseBinaryData($data)
746
746
$ this ->assertSame ('Hello world ' , Inline::parse ($ data ));
747
747
}
748
748
749
- public function getBinaryData ()
749
+ public static function getBinaryData ()
750
750
{
751
751
return [
752
752
'enclosed with double quotes ' => ['!!binary "SGVsbG8gd29ybGQ=" ' ],
@@ -766,7 +766,7 @@ public function testParseInvalidBinaryData($data, $expectedMessage)
766
766
Inline::parse ($ data );
767
767
}
768
768
769
- public function getInvalidBinaryData ()
769
+ public static function getInvalidBinaryData ()
770
770
{
771
771
return [
772
772
'length not a multiple of four ' => ['!!binary "SGVsbG8d29ybGQ=" ' , '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/ ' ],
@@ -808,7 +808,7 @@ public function testParseMissingMappingValueAsNull($yaml, $expected)
808
808
$ this ->assertSame ($ expected , Inline::parse ($ yaml ));
809
809
}
810
810
811
- public function getTestsForNullValues ()
811
+ public static function getTestsForNullValues ()
812
812
{
813
813
return [
814
814
'null before closing curly brace ' => ['{foo:} ' , ['foo ' => null ]],
@@ -831,7 +831,7 @@ public function testImplicitStringCastingOfMappingKeysIsDeprecated($yaml, $expec
831
831
$ this ->assertSame ($ expected , Inline::parse ($ yaml ));
832
832
}
833
833
834
- public function getNotPhpCompatibleMappingKeyData ()
834
+ public static function getNotPhpCompatibleMappingKeyData ()
835
835
{
836
836
return [
837
837
'boolean-true ' => ['{true: "foo"} ' , ['true ' => 'foo ' ]],
@@ -910,7 +910,7 @@ public function testParseOctalNumbers($expected, $yaml)
910
910
self ::assertSame ($ expected , Inline::parse ($ yaml ));
911
911
}
912
912
913
- public function getTestsForOctalNumbers ()
913
+ public static function getTestsForOctalNumbers ()
914
914
{
915
915
return [
916
916
'positive octal number ' => [28 , '0o34 ' ],
@@ -927,7 +927,7 @@ public function testParseOctalNumbersYaml11Notation(string $expected, string $ya
927
927
self ::assertSame ($ expected , Inline::parse ($ yaml ));
928
928
}
929
929
930
- public function getTestsForOctalNumbersYaml11Notation ()
930
+ public static function getTestsForOctalNumbersYaml11Notation ()
931
931
{
932
932
return [
933
933
'positive octal number ' => ['034 ' , '034 ' ],
@@ -949,7 +949,7 @@ public function testPhpObjectWithEmptyValue(string $value)
949
949
Inline::parse ($ value , Yaml::PARSE_OBJECT );
950
950
}
951
951
952
- public function phpObjectTagWithEmptyValueProvider ()
952
+ public static function phpObjectTagWithEmptyValueProvider ()
953
953
{
954
954
return [
955
955
['!php/object ' ],
@@ -983,7 +983,7 @@ public function testPhpEnumTagWithEmptyValue(string $value)
983
983
Inline::parse (str_replace ('!php/const ' , '!php/enum ' , $ value ), Yaml::PARSE_CONSTANT );
984
984
}
985
985
986
- public function phpConstTagWithEmptyValueProvider ()
986
+ public static function phpConstTagWithEmptyValueProvider ()
987
987
{
988
988
return [
989
989
['!php/const ' ],
@@ -1019,7 +1019,7 @@ public function testUnquotedExclamationMarkThrows(string $value)
1019
1019
Inline::parse ($ value );
1020
1020
}
1021
1021
1022
- public function unquotedExclamationMarkThrowsProvider ()
1022
+ public static function unquotedExclamationMarkThrowsProvider ()
1023
1023
{
1024
1024
return [
1025
1025
['! ' ],
@@ -1051,7 +1051,7 @@ public function testQuotedExclamationMark($expected, string $value)
1051
1051
}
1052
1052
1053
1053
// This provider should stay consistent with unquotedExclamationMarkThrowsProvider
1054
- public function quotedExclamationMarkProvider ()
1054
+ public static function quotedExclamationMarkProvider ()
1055
1055
{
1056
1056
return [
1057
1057
['! ' , '"!" ' ],
@@ -1081,7 +1081,7 @@ public function testParseIdeographicSpace(string $yaml, string $expected)
1081
1081
$ this ->assertSame ($ expected , Inline::parse ($ yaml ));
1082
1082
}
1083
1083
1084
- public function ideographicSpaceProvider (): array
1084
+ public static function ideographicSpaceProvider (): array
1085
1085
{
1086
1086
return [
1087
1087
["\u{3000}" , ' ' ],
0 commit comments