Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Yaml] fixed unneeded BC break

  • Loading branch information...
commit 67069f62cf99dec4c6263579a472c6175a7ab2b3 1 parent 3f0e5d3
@fabpot fabpot authored
Showing with 4 additions and 4 deletions.
  1. +3 −3 Dumper.php
  2. +1 −1  Yaml.php
View
6 Dumper.php
@@ -40,13 +40,13 @@ public function setIndentation($num)
*
* @param mixed $input The PHP value
* @param integer $inline The level where you switch to inline YAML
+ * @param integer $indent The level of indentation (used internally)
* @param Boolean $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
* @param Boolean $objectSupport true if object support is enabled, false otherwise
- * @param integer $indent The level of indentation (used internally)
*
* @return string The YAML representation of the PHP value
*/
- public function dump($input, $inline = 0, $exceptionOnInvalidType = false, $objectSupport = false, $indent = 0)
+ public function dump($input, $inline = 0, $indent = 0, $exceptionOnInvalidType = false, $objectSupport = false)
{
$output = '';
$prefix = $indent ? str_repeat(' ', $indent) : '';
@@ -63,7 +63,7 @@ public function dump($input, $inline = 0, $exceptionOnInvalidType = false, $obje
$prefix,
$isAHash ? Inline::dump($key, $exceptionOnInvalidType, $objectSupport).':' : '-',
$willBeInlined ? ' ' : "\n",
- $this->dump($value, $inline - 1, $exceptionOnInvalidType, $objectSupport, $willBeInlined ? 0 : $indent + $this->indentation)
+ $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $exceptionOnInvalidType, $objectSupport)
).($willBeInlined ? "\n" : '');
}
}
View
2  Yaml.php
@@ -150,6 +150,6 @@ public static function dump($array, $inline = 2, $indent = 2, $exceptionOnInvali
$yaml = new Dumper();
$yaml->setIndentation($indent);
- return $yaml->dump($array, $inline, $exceptionOnInvalidType, $objectSupport);
+ return $yaml->dump($array, $inline, 0, $exceptionOnInvalidType, $objectSupport);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.