@@ -56,7 +56,7 @@ public function testParsePhpConstants($yaml, $value)
56
56
$ this ->assertSame ($ value , $ actual );
57
57
}
58
58
59
- public function getTestsForParsePhpConstants ()
59
+ public static function getTestsForParsePhpConstants ()
60
60
{
61
61
return [
62
62
['!php/const Symfony\Component\Yaml\Yaml::PARSE_CONSTANT ' , Yaml::PARSE_CONSTANT ],
@@ -195,7 +195,7 @@ public function testParseReferences($yaml, $expected)
195
195
$ this ->assertSame ($ expected , Inline::parse ($ yaml , 0 , $ references ));
196
196
}
197
197
198
- public function getDataForParseReferences ()
198
+ public static function getDataForParseReferences ()
199
199
{
200
200
return [
201
201
'scalar ' => ['*var ' , 'var-value ' ],
@@ -245,7 +245,7 @@ public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
245
245
Inline::parse (sprintf ('{ foo: %sfoo } ' , $ indicator ));
246
246
}
247
247
248
- public function getReservedIndicators ()
248
+ public static function getReservedIndicators ()
249
249
{
250
250
return [['@ ' ], ['` ' ]];
251
251
}
@@ -261,7 +261,7 @@ public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)
261
261
Inline::parse (sprintf ('{ foo: %sfoo } ' , $ indicator ));
262
262
}
263
263
264
- public function getScalarIndicators ()
264
+ public static function getScalarIndicators ()
265
265
{
266
266
return [['| ' ], ['> ' ], ['% ' ]];
267
267
}
@@ -274,7 +274,7 @@ public function testIsHash($array, $expected)
274
274
$ this ->assertSame ($ expected , Inline::isHash ($ array ));
275
275
}
276
276
277
- public function getDataForIsHash ()
277
+ public static function getDataForIsHash ()
278
278
{
279
279
return [
280
280
[[], false ],
@@ -284,7 +284,7 @@ public function getDataForIsHash()
284
284
];
285
285
}
286
286
287
- public function getTestsForParse ()
287
+ public static function getTestsForParse ()
288
288
{
289
289
return [
290
290
['' , '' ],
@@ -370,7 +370,7 @@ public function getTestsForParse()
370
370
];
371
371
}
372
372
373
- public function getTestsForParseWithMapObjects ()
373
+ public static function getTestsForParseWithMapObjects ()
374
374
{
375
375
return [
376
376
['' , '' ],
@@ -451,7 +451,7 @@ public function getTestsForParseWithMapObjects()
451
451
];
452
452
}
453
453
454
- public function getTestsForDump ()
454
+ public static function getTestsForDump ()
455
455
{
456
456
return [
457
457
['null ' , null ],
@@ -549,7 +549,7 @@ public function testParseTimestampAsDateTimeObject(string $yaml, int $year, int
549
549
$ this ->assertSame ($ timezone , $ date ->format ('O ' ));
550
550
}
551
551
552
- public function getTimestampTests (): array
552
+ public static function getTimestampTests (): array
553
553
{
554
554
return [
555
555
'canonical ' => ['2001-12-15T02:59:43.1Z ' , 2001 , 12 , 15 , 2 , 59 , 43 , 100000 , '+0000 ' ],
@@ -591,7 +591,7 @@ public function testDumpUnitEnum()
591
591
$ this ->assertSame ("!php/const Symfony\Component\Yaml\Tests\Fixtures\FooUnitEnum::BAR " , Inline::dump (FooUnitEnum::BAR ));
592
592
}
593
593
594
- public function getDateTimeDumpTests ()
594
+ public static function getDateTimeDumpTests ()
595
595
{
596
596
$ tests = [];
597
597
@@ -612,7 +612,7 @@ public function testParseBinaryData($data)
612
612
$ this ->assertSame ('Hello world ' , Inline::parse ($ data ));
613
613
}
614
614
615
- public function getBinaryData ()
615
+ public static function getBinaryData ()
616
616
{
617
617
return [
618
618
'enclosed with double quotes ' => ['!!binary "SGVsbG8gd29ybGQ=" ' ],
@@ -632,7 +632,7 @@ public function testParseInvalidBinaryData($data, $expectedMessage)
632
632
Inline::parse ($ data );
633
633
}
634
634
635
- public function getInvalidBinaryData ()
635
+ public static function getInvalidBinaryData ()
636
636
{
637
637
return [
638
638
'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\)/ ' ],
@@ -674,7 +674,7 @@ public function testParseMissingMappingValueAsNull($yaml, $expected)
674
674
$ this ->assertSame ($ expected , Inline::parse ($ yaml ));
675
675
}
676
676
677
- public function getTestsForNullValues ()
677
+ public static function getTestsForNullValues ()
678
678
{
679
679
return [
680
680
'null before closing curly brace ' => ['{foo:} ' , ['foo ' => null ]],
@@ -697,7 +697,7 @@ public function testImplicitStringCastingOfMappingKeysIsDeprecated($yaml, $expec
697
697
$ this ->assertSame ($ expected , Inline::parse ($ yaml ));
698
698
}
699
699
700
- public function getNotPhpCompatibleMappingKeyData ()
700
+ public static function getNotPhpCompatibleMappingKeyData ()
701
701
{
702
702
return [
703
703
'boolean-true ' => ['{true: "foo"} ' , ['true ' => 'foo ' ]],
@@ -776,7 +776,7 @@ public function testParseOctalNumbers($expected, $yaml)
776
776
self ::assertSame ($ expected , Inline::parse ($ yaml ));
777
777
}
778
778
779
- public function getTestsForOctalNumbers ()
779
+ public static function getTestsForOctalNumbers ()
780
780
{
781
781
return [
782
782
'positive octal number ' => [28 , '0o34 ' ],
@@ -797,7 +797,7 @@ public function testParseOctalNumbersYaml11Notation(int $expected, string $yaml,
797
797
self ::assertSame ($ expected , Inline::parse ($ yaml ));
798
798
}
799
799
800
- public function getTestsForOctalNumbersYaml11Notation ()
800
+ public static function getTestsForOctalNumbersYaml11Notation ()
801
801
{
802
802
return [
803
803
'positive octal number ' => [28 , '034 ' , '0o34 ' ],
@@ -818,7 +818,7 @@ public function testPhpObjectWithEmptyValue($expected, $value)
818
818
$ this ->assertSame ($ expected , Inline::parse ($ value , Yaml::PARSE_OBJECT ));
819
819
}
820
820
821
- public function phpObjectTagWithEmptyValueProvider ()
821
+ public static function phpObjectTagWithEmptyValueProvider ()
822
822
{
823
823
return [
824
824
[false , '!php/object ' ],
@@ -842,7 +842,7 @@ public function testPhpConstTagWithEmptyValue($expected, $value)
842
842
$ this ->assertSame ($ expected , Inline::parse ($ value , Yaml::PARSE_CONSTANT ));
843
843
}
844
844
845
- public function phpConstTagWithEmptyValueProvider ()
845
+ public static function phpConstTagWithEmptyValueProvider ()
846
846
{
847
847
return [
848
848
['' , '!php/const ' ],
@@ -894,7 +894,7 @@ public function testUnquotedExclamationMarkThrows(string $value)
894
894
Inline::parse ($ value );
895
895
}
896
896
897
- public function unquotedExclamationMarkThrowsProvider ()
897
+ public static function unquotedExclamationMarkThrowsProvider ()
898
898
{
899
899
return [
900
900
['! ' ],
@@ -926,7 +926,7 @@ public function testQuotedExclamationMark($expected, string $value)
926
926
}
927
927
928
928
// This provider should stay consistent with unquotedExclamationMarkThrowsProvider
929
- public function quotedExclamationMarkProvider ()
929
+ public static function quotedExclamationMarkProvider ()
930
930
{
931
931
return [
932
932
['! ' , '"!" ' ],
@@ -956,7 +956,7 @@ public function testParseIdeographicSpace(string $yaml, string $expected)
956
956
$ this ->assertSame ($ expected , Inline::parse ($ yaml ));
957
957
}
958
958
959
- public function ideographicSpaceProvider (): array
959
+ public static function ideographicSpaceProvider (): array
960
960
{
961
961
return [
962
962
["\u{3000}" , ' ' ],
0 commit comments