🔧
This commit is contained in:
6
vendor/symfony/yaml/Escaper.php
vendored
6
vendor/symfony/yaml/Escaper.php
vendored
@@ -62,7 +62,7 @@ class Escaper
|
||||
*/
|
||||
public static function escapeWithDoubleQuotes(string $value): string
|
||||
{
|
||||
return sprintf('"%s"', str_replace(self::ESCAPEES, self::ESCAPED, $value));
|
||||
return \sprintf('"%s"', str_replace(self::ESCAPEES, self::ESCAPED, $value));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,7 +80,7 @@ class Escaper
|
||||
|
||||
// Determines if the PHP value contains any single characters that would
|
||||
// cause it to require single quoting in YAML.
|
||||
return 0 < preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` \p{Zs}]/xu', $value);
|
||||
return 0 < preg_match('/[\s\'"\:\{\}\[\],&\*\#\?] | \A[\-?|<>=!%@`\p{Zs}]/xu', $value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,6 +90,6 @@ class Escaper
|
||||
*/
|
||||
public static function escapeWithSingleQuotes(string $value): string
|
||||
{
|
||||
return sprintf("'%s'", str_replace('\'', '\'\'', $value));
|
||||
return \sprintf("'%s'", str_replace('\'', '\'\'', $value));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user