Update Composer packages

This commit is contained in:
Paul Nicoué 2025-01-12 18:56:44 +01:00
parent a80f1abaa4
commit 0a904482ae
41 changed files with 922 additions and 679 deletions

View file

@ -34,6 +34,7 @@ class Yaml
public const PARSE_CUSTOM_TAGS = 512;
public const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024;
public const DUMP_NULL_AS_TILDE = 2048;
public const DUMP_NUMERIC_KEY_AS_STRING = 4096;
/**
* Parses a YAML file into a PHP value.
@ -46,11 +47,9 @@ class Yaml
* @param string $filename The path to the YAML file to be parsed
* @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
*
* @return mixed
*
* @throws ParseException If the file could not be read or the YAML is not valid
*/
public static function parseFile(string $filename, int $flags = 0)
public static function parseFile(string $filename, int $flags = 0): mixed
{
$yaml = new Parser();
@ -69,11 +68,9 @@ class Yaml
* @param string $input A string containing YAML
* @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
*
* @return mixed
*
* @throws ParseException If the YAML is not valid
*/
public static function parse(string $input, int $flags = 0)
public static function parse(string $input, int $flags = 0): mixed
{
$yaml = new Parser();
@ -91,7 +88,7 @@ class Yaml
* @param int $indent The amount of spaces to use for indentation of nested nodes
* @param int $flags A bit field of DUMP_* constants to customize the dumped YAML string
*/
public static function dump($input, int $inline = 2, int $indent = 4, int $flags = 0): string
public static function dump(mixed $input, int $inline = 2, int $indent = 4, int $flags = 0): string
{
$yaml = new Dumper($indent);