Skip to content

Commit 0ceab13

Browse files
Merge branch '2.7' into 2.8
* 2.7: [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 b57a8d1 + 4341144 commit 0ceab13

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
@@ -73,20 +73,20 @@ public static function parse($input, $exceptionOnInvalidType = false, $objectSup
7373
}
7474

7575
/**
76-
* Dumps a PHP array to a YAML string.
76+
* Dumps a PHP value to a YAML string.
7777
*
7878
* The dump method, when supplied with an array, will do its best
7979
* to convert the array into friendly YAML.
8080
*
81-
* @param array $array PHP array
81+
* @param mixed $input The PHP value
8282
* @param int $inline The level where you switch to inline YAML
8383
* @param int $indent The amount of spaces to use for indentation of nested nodes
8484
* @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
8585
* @param bool $objectSupport true if object support is enabled, false otherwise
8686
*
87-
* @return string A YAML string representing the original PHP array
87+
* @return string A YAML string representing the original PHP value
8888
*/
89-
public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false)
89+
public static function dump($input, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false)
9090
{
9191
if ($indent < 1) {
9292
throw new \InvalidArgumentException('The indentation must be greater than zero.');
@@ -95,6 +95,6 @@ public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvali
9595
$yaml = new Dumper();
9696
$yaml->setIndentation($indent);
9797

98-
return $yaml->dump($array, $inline, 0, $exceptionOnInvalidType, $objectSupport);
98+
return $yaml->dump($input, $inline, 0, $exceptionOnInvalidType, $objectSupport);
9999
}
100100
}

0 commit comments

Comments
 (0)