@@ -34,7 +34,7 @@ class Inline
34
34
private static bool $ objectForMap = false ;
35
35
private static bool $ constantSupport = false ;
36
36
37
- public static function initialize (int $ flags , int $ parsedLineNumber = null , string $ parsedFilename = null ): void
37
+ public static function initialize (int $ flags , ? int $ parsedLineNumber = null , ? string $ parsedFilename = null ): void
38
38
{
39
39
self ::$ exceptionOnInvalidType = (bool ) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $ flags );
40
40
self ::$ objectSupport = (bool ) (Yaml::PARSE_OBJECT & $ flags );
@@ -55,7 +55,7 @@ public static function initialize(int $flags, int $parsedLineNumber = null, stri
55
55
*
56
56
* @throws ParseException
57
57
*/
58
- public static function parse (string $ value = null , int $ flags = 0 , array &$ references = []): mixed
58
+ public static function parse (? string $ value = null , int $ flags = 0 , array &$ references = []): mixed
59
59
{
60
60
if (null === $ value ) {
61
61
return '' ;
@@ -271,7 +271,7 @@ private static function dumpNull(int $flags): string
271
271
*
272
272
* @throws ParseException When malformed inline YAML string is parsed
273
273
*/
274
- public static function parseScalar (string $ scalar , int $ flags = 0 , array $ delimiters = null , int &$ i = 0 , bool $ evaluate = true , array &$ references = [], bool &$ isQuoted = null ): mixed
274
+ public static function parseScalar (string $ scalar , int $ flags = 0 , ? array $ delimiters = null , int &$ i = 0 , bool $ evaluate = true , array &$ references = [], ? bool &$ isQuoted = null ): mixed
275
275
{
276
276
if (\in_array ($ scalar [$ i ], ['" ' , "' " ], true )) {
277
277
// quoted scalar
@@ -560,7 +560,7 @@ private static function parseMapping(string $mapping, int $flags, int &$i = 0, a
560
560
*
561
561
* @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
562
562
*/
563
- private static function evaluateScalar (string $ scalar , int $ flags , array &$ references = [], bool &$ isQuotedString = null ): mixed
563
+ private static function evaluateScalar (string $ scalar , int $ flags , array &$ references = [], ? bool &$ isQuotedString = null ): mixed
564
564
{
565
565
$ isQuotedString = false ;
566
566
$ scalar = trim ($ scalar );
0 commit comments