package and depencies
This commit is contained in:
22
vendor/symfony/yaml/Exception/ParseException.php
vendored
22
vendor/symfony/yaml/Exception/ParseException.php
vendored
@@ -18,10 +18,10 @@ namespace Symfony\Component\Yaml\Exception;
|
||||
*/
|
||||
class ParseException extends RuntimeException
|
||||
{
|
||||
private $parsedFile;
|
||||
private $parsedLine;
|
||||
private $snippet;
|
||||
private $rawMessage;
|
||||
private ?string $parsedFile;
|
||||
private int $parsedLine;
|
||||
private ?string $snippet;
|
||||
private string $rawMessage;
|
||||
|
||||
/**
|
||||
* @param string $message The error message
|
||||
@@ -43,10 +43,8 @@ class ParseException extends RuntimeException
|
||||
|
||||
/**
|
||||
* Gets the snippet of code near the error.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSnippet()
|
||||
public function getSnippet(): string
|
||||
{
|
||||
return $this->snippet;
|
||||
}
|
||||
@@ -65,10 +63,8 @@ class ParseException extends RuntimeException
|
||||
* Gets the filename where the error occurred.
|
||||
*
|
||||
* This method returns null if a string is parsed.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getParsedFile()
|
||||
public function getParsedFile(): string
|
||||
{
|
||||
return $this->parsedFile;
|
||||
}
|
||||
@@ -85,10 +81,8 @@ class ParseException extends RuntimeException
|
||||
|
||||
/**
|
||||
* Gets the line where the error occurred.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getParsedLine()
|
||||
public function getParsedLine(): int
|
||||
{
|
||||
return $this->parsedLine;
|
||||
}
|
||||
@@ -108,7 +102,7 @@ class ParseException extends RuntimeException
|
||||
$this->message = $this->rawMessage;
|
||||
|
||||
$dot = false;
|
||||
if ('.' === substr($this->message, -1)) {
|
||||
if (str_ends_with($this->message, '.')) {
|
||||
$this->message = substr($this->message, 0, -1);
|
||||
$dot = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user