diff --git a/src/Symfony/Component/Yaml/Exception/ParseException.php b/src/Symfony/Component/Yaml/Exception/ParseException.php index 95efe68fbb8a1..4854258ca4457 100644 --- a/src/Symfony/Component/Yaml/Exception/ParseException.php +++ b/src/Symfony/Component/Yaml/Exception/ParseException.php @@ -54,10 +54,8 @@ public function getSnippet() /** * Sets the snippet of code near the error. - * - * @param string $snippet The code snippet */ - public function setSnippet($snippet) + public function setSnippet(string $snippet) { $this->snippet = $snippet; @@ -78,10 +76,8 @@ public function getParsedFile() /** * Sets the filename where the error occurred. - * - * @param string $parsedFile The filename */ - public function setParsedFile($parsedFile) + public function setParsedFile(string $parsedFile) { $this->parsedFile = $parsedFile; @@ -100,10 +96,8 @@ public function getParsedLine() /** * Sets the line where the error occurred. - * - * @param int $parsedLine The file line */ - public function setParsedLine($parsedLine) + public function setParsedLine(int $parsedLine) { $this->parsedLine = $parsedLine; diff --git a/src/Symfony/Component/Yaml/Inline.php b/src/Symfony/Component/Yaml/Inline.php index 4b12b9b11a9ba..f3f6761f818f6 100644 --- a/src/Symfony/Component/Yaml/Inline.php +++ b/src/Symfony/Component/Yaml/Inline.php @@ -34,12 +34,7 @@ class Inline private static $objectForMap = false; private static $constantSupport = false; - /** - * @param int $flags - * @param int|null $parsedLineNumber - * @param string|null $parsedFilename - */ - public static function initialize($flags, $parsedLineNumber = null, $parsedFilename = null) + public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null) { self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags); self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags); @@ -704,7 +699,7 @@ public static function evaluateBinaryScalar(string $scalar): string return base64_decode($parsedBinaryData, true); } - private static function isBinaryString(string $value) + private static function isBinaryString(string $value): bool { return !preg_match('//u', $value) || preg_match('/[^\x00\x07-\x0d\x1B\x20-\xff]/', $value); }