@@ -34,7 +34,7 @@ class Inline
3434 private static $ objectForMap = false ;
3535 private static $ constantSupport = false ;
3636
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 )
3838 {
3939 self ::$ exceptionOnInvalidType = (bool ) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $ flags );
4040 self ::$ objectSupport = (bool ) (Yaml::PARSE_OBJECT & $ flags );
@@ -58,7 +58,7 @@ public static function initialize(int $flags, int $parsedLineNumber = null, stri
5858 *
5959 * @throws ParseException
6060 */
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 = [])
6262 {
6363 if (null === $ value ) {
6464 return '' ;
@@ -269,7 +269,7 @@ private static function dumpNull(int $flags): string
269269 *
270270 * @throws ParseException When malformed inline YAML string is parsed
271271 */
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 )
273273 {
274274 if (\in_array ($ scalar [$ i ], ['" ' , "' " ], true )) {
275275 // quoted scalar
@@ -562,7 +562,7 @@ private static function parseMapping(string $mapping, int $flags, int &$i = 0, a
562562 *
563563 * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
564564 */
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 )
566566 {
567567 $ isQuotedString = false ;
568568 $ scalar = trim ($ scalar );
0 commit comments