Skip to content

Commit 2a9101d

Browse files
Merge branch '2.8' into 3.0
* 2.8: [VarDumper] Fix dumping jsons casted as arrays PassConfig::getMergePass is not an array Revert "bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas)" Fix the retrieval of the last username when using forwarding [Yaml] Fix PHPDoc of the Yaml class [HttpFoundation] Add OPTIONS and TRACE to the list of safe methods Update getAbsoluteUri() for query string uris
2 parents d7dfe7f + 0ceab13 commit 2a9101d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Yaml.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ public static function parse($input, $exceptionOnInvalidType = false, $objectSup
4646
}
4747

4848
/**
49-
* Dumps a PHP array to a YAML string.
49+
* Dumps a PHP value to a YAML string.
5050
*
5151
* The dump method, when supplied with an array, will do its best
5252
* to convert the array into friendly YAML.
5353
*
54-
* @param array $array PHP array
54+
* @param mixed $input The PHP value
5555
* @param int $inline The level where you switch to inline YAML
5656
* @param int $indent The amount of spaces to use for indentation of nested nodes
5757
* @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
5858
* @param bool $objectSupport true if object support is enabled, false otherwise
5959
*
60-
* @return string A YAML string representing the original PHP array
60+
* @return string A YAML string representing the original PHP value
6161
*/
62-
public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false)
62+
public static function dump($input, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false)
6363
{
6464
if ($indent < 1) {
6565
throw new \InvalidArgumentException('The indentation must be greater than zero.');
@@ -68,6 +68,6 @@ public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvali
6868
$yaml = new Dumper();
6969
$yaml->setIndentation($indent);
7070

71-
return $yaml->dump($array, $inline, 0, $exceptionOnInvalidType, $objectSupport);
71+
return $yaml->dump($input, $inline, 0, $exceptionOnInvalidType, $objectSupport);
7272
}
7373
}

0 commit comments

Comments
 (0)