Skip to content

Commit 834e0ab

Browse files
committed
Passing null to Inline::parse is not allowed
1 parent c02610e commit 834e0ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Yaml/Inline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static function initialize(int $flags, int $parsedLineNumber = null, stri
5555
*
5656
* @throws ParseException
5757
*/
58-
public static function parse(string $value = null, int $flags = 0, array &$references = []): mixed
58+
public static function parse(string $value, int $flags = 0, array &$references = []): mixed
5959
{
6060
self::initialize($flags);
6161

src/Symfony/Component/Yaml/Tests/InlineTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected function setUp(): void
2929
/**
3030
* @dataProvider getTestsForParse
3131
*/
32-
public function testParse($yaml, $value, $flags = 0)
32+
public function testParse(string $yaml, $value, $flags = 0)
3333
{
3434
$this->assertSame($value, Inline::parse($yaml, $flags), sprintf('::parse() converts an inline YAML to a PHP structure (%s)', $yaml));
3535
}

0 commit comments

Comments
 (0)