@@ -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 ],
@@ -583,7 +583,7 @@ public function testParseTimestampAsDateTimeObject(string $yaml, int $year, int
583
583
$ this ->assertSame ($ timezone , $ date ->format ('O ' ));
584
584
}
585
585
586
- public function getTimestampTests (): array
586
+ public static function getTimestampTests (): array
587
587
{
588
588
return [
589
589
'canonical ' => ['2001-12-15T02:59:43.1Z ' , 2001 , 12 , 15 , 2 , 59 , 43 , 100000 , '+0000 ' ],
@@ -632,7 +632,7 @@ public function testParseBackedEnumValue()
632
632
$ this ->assertSame (FooBackedEnum::BAR ->value , Inline::parse ("!php/enum Symfony\Component\Yaml\Tests\Fixtures\FooBackedEnum::BAR->value " , Yaml::PARSE_CONSTANT ));
633
633
}
634
634
635
- public function getDateTimeDumpTests ()
635
+ public static function getDateTimeDumpTests ()
636
636
{
637
637
$ tests = [];
638
638
@@ -653,7 +653,7 @@ public function testParseBinaryData($data)
653
653
$ this ->assertSame ('Hello world ' , Inline::parse ($ data ));
654
654
}
655
655
656
- public function getBinaryData ()
656
+ public static function getBinaryData ()
657
657
{
658
658
return [
659
659
'enclosed with double quotes ' => ['!!binary "SGVsbG8gd29ybGQ=" ' ],
@@ -673,7 +673,7 @@ public function testParseInvalidBinaryData($data, $expectedMessage)
673
673
Inline::parse ($ data );
674
674
}
675
675
676
- public function getInvalidBinaryData ()
676
+ public static function getInvalidBinaryData ()
677
677
{
678
678
return [
679
679
'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\)/ ' ],
@@ -715,7 +715,7 @@ public function testParseMissingMappingValueAsNull($yaml, $expected)
715
715
$ this ->assertSame ($ expected , Inline::parse ($ yaml ));
716
716
}
717
717
718
- public function getTestsForNullValues ()
718
+ public static function getTestsForNullValues ()
719
719
{
720
720
return [
721
721
'null before closing curly brace ' => ['{foo:} ' , ['foo ' => null ]],
@@ -738,7 +738,7 @@ public function testImplicitStringCastingOfMappingKeysIsDeprecated($yaml, $expec
738
738
$ this ->assertSame ($ expected , Inline::parse ($ yaml ));
739
739
}
740
740
741
- public function getNotPhpCompatibleMappingKeyData ()
741
+ public static function getNotPhpCompatibleMappingKeyData ()
742
742
{
743
743
return [
744
744
'boolean-true ' => ['{true: "foo"} ' , ['true ' => 'foo ' ]],
@@ -817,7 +817,7 @@ public function testParseOctalNumbers($expected, $yaml)
817
817
self ::assertSame ($ expected , Inline::parse ($ yaml ));
818
818
}
819
819
820
- public function getTestsForOctalNumbers ()
820
+ public static function getTestsForOctalNumbers ()
821
821
{
822
822
return [
823
823
'positive octal number ' => [28 , '0o34 ' ],
@@ -834,7 +834,7 @@ public function testParseOctalNumbersYaml11Notation(string $expected, string $ya
834
834
self ::assertSame ($ expected , Inline::parse ($ yaml ));
835
835
}
836
836
837
- public function getTestsForOctalNumbersYaml11Notation ()
837
+ public static function getTestsForOctalNumbersYaml11Notation ()
838
838
{
839
839
return [
840
840
'positive octal number ' => ['034 ' , '034 ' ],
@@ -856,7 +856,7 @@ public function testPhpObjectWithEmptyValue(string $value)
856
856
Inline::parse ($ value , Yaml::PARSE_OBJECT );
857
857
}
858
858
859
- public function phpObjectTagWithEmptyValueProvider ()
859
+ public static function phpObjectTagWithEmptyValueProvider ()
860
860
{
861
861
return [
862
862
['!php/object ' ],
@@ -890,7 +890,7 @@ public function testPhpEnumTagWithEmptyValue(string $value)
890
890
Inline::parse (str_replace ('!php/const ' , '!php/enum ' , $ value ), Yaml::PARSE_CONSTANT );
891
891
}
892
892
893
- public function phpConstTagWithEmptyValueProvider ()
893
+ public static function phpConstTagWithEmptyValueProvider ()
894
894
{
895
895
return [
896
896
['!php/const ' ],
@@ -926,7 +926,7 @@ public function testUnquotedExclamationMarkThrows(string $value)
926
926
Inline::parse ($ value );
927
927
}
928
928
929
- public function unquotedExclamationMarkThrowsProvider ()
929
+ public static function unquotedExclamationMarkThrowsProvider ()
930
930
{
931
931
return [
932
932
['! ' ],
@@ -958,7 +958,7 @@ public function testQuotedExclamationMark($expected, string $value)
958
958
}
959
959
960
960
// This provider should stay consistent with unquotedExclamationMarkThrowsProvider
961
- public function quotedExclamationMarkProvider ()
961
+ public static function quotedExclamationMarkProvider ()
962
962
{
963
963
return [
964
964
['! ' , '"!" ' ],
@@ -988,7 +988,7 @@ public function testParseIdeographicSpace(string $yaml, string $expected)
988
988
$ this ->assertSame ($ expected , Inline::parse ($ yaml ));
989
989
}
990
990
991
- public function ideographicSpaceProvider (): array
991
+ public static function ideographicSpaceProvider (): array
992
992
{
993
993
return [
994
994
["\u{3000}" , ' ' ],
0 commit comments