From 8b772954944d601e071fc5b74018509a24373f13 Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 13 Feb 2019 18:31:29 +0300 Subject: [PATCH] Flextype Core: YamlParser - improve encode method flags Default flags: Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE --- flextype/parsers/YamlParser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flextype/parsers/YamlParser.php b/flextype/parsers/YamlParser.php index a327df43..6a49a518 100644 --- a/flextype/parsers/YamlParser.php +++ b/flextype/parsers/YamlParser.php @@ -52,7 +52,7 @@ class YamlParser { * * @var int */ - public static $flag = 16; + public static $flag = Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK|Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE; /** * Dumps a PHP value to a YAML string. @@ -67,7 +67,7 @@ class YamlParser { * * @return string A YAML string representing the original PHP value */ - public static function encode($input, int $inline = 5, int $indent = 2, int $flags = 16) : string + public static function encode($input, int $inline = 5, int $indent = 2, int $flags = Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK|Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE) : string { try { return Yaml::dump(