@@ -34,7 +34,7 @@ class Inline
3434 private static bool $ objectForMap = false ;
3535 private static bool $ constantSupport = false ;
3636
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
3838 {
3939 self ::$ exceptionOnInvalidType = (bool ) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $ flags );
4040 self ::$ objectSupport = (bool ) (Yaml::PARSE_OBJECT & $ flags );
@@ -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 = null , int $ flags = 0 , array &$ references = []): mixed
5959 {
6060 if (null === $ value ) {
6161 return '' ;
@@ -271,7 +271,7 @@ private static function dumpNull(int $flags): string
271271 *
272272 * @throws ParseException When malformed inline YAML string is parsed
273273 */
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
275275 {
276276 if (\in_array ($ scalar [$ i ], ['" ' , "' " ], true )) {
277277 // quoted scalar
@@ -560,7 +560,7 @@ private static function parseMapping(string $mapping, int $flags, int &$i = 0, a
560560 *
561561 * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
562562 */
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
564564 {
565565 $ isQuotedString = false ;
566566 $ scalar = trim ($ scalar );
0 commit comments