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