Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
41
vendor/symfony/yaml/Dumper.php
vendored
41
vendor/symfony/yaml/Dumper.php
vendored
@@ -16,7 +16,7 @@ namespace Symfony\Component\Yaml;
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @final since version 3.4
|
||||
* @final
|
||||
*/
|
||||
class Dumper
|
||||
{
|
||||
@@ -27,10 +27,7 @@ class Dumper
|
||||
*/
|
||||
protected $indentation;
|
||||
|
||||
/**
|
||||
* @param int $indentation
|
||||
*/
|
||||
public function __construct($indentation = 4)
|
||||
public function __construct(int $indentation = 4)
|
||||
{
|
||||
if ($indentation < 1) {
|
||||
throw new \InvalidArgumentException('The indentation must be greater than zero.');
|
||||
@@ -39,20 +36,6 @@ class Dumper
|
||||
$this->indentation = $indentation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the indentation.
|
||||
*
|
||||
* @param int $num The amount of spaces to use for indentation of nested nodes
|
||||
*
|
||||
* @deprecated since version 3.1, to be removed in 4.0. Pass the indentation to the constructor instead.
|
||||
*/
|
||||
public function setIndentation($num)
|
||||
{
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 3.1 and will be removed in 4.0. Pass the indentation to the constructor instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->indentation = (int) $num;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dumps a PHP value to YAML.
|
||||
*
|
||||
@@ -63,26 +46,8 @@ class Dumper
|
||||
*
|
||||
* @return string The YAML representation of the PHP value
|
||||
*/
|
||||
public function dump($input, $inline = 0, $indent = 0, $flags = 0)
|
||||
public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0): string
|
||||
{
|
||||
if (\is_bool($flags)) {
|
||||
@trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED);
|
||||
|
||||
if ($flags) {
|
||||
$flags = Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE;
|
||||
} else {
|
||||
$flags = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (\func_num_args() >= 5) {
|
||||
@trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED);
|
||||
|
||||
if (func_get_arg(4)) {
|
||||
$flags |= Yaml::DUMP_OBJECT;
|
||||
}
|
||||
}
|
||||
|
||||
$output = '';
|
||||
$prefix = $indent ? str_repeat(' ', $indent) : '';
|
||||
$dumpObjectAsInlineMap = true;
|
||||
|
Reference in New Issue
Block a user