mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)
* Update Symfony lib to version ~6.4.0 * Update code missing return type * Add an iTop general configuration entry to store application secret (Symfony mandatory parameter) * Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
@@ -23,42 +23,32 @@ use Symfony\Component\CssSelector\Parser\Token;
|
||||
*/
|
||||
class SyntaxErrorException extends ParseException
|
||||
{
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function unexpectedToken(string $expectedValue, Token $foundToken)
|
||||
public static function unexpectedToken(string $expectedValue, Token $foundToken): self
|
||||
{
|
||||
return new self(sprintf('Expected %s, but %s found.', $expectedValue, $foundToken));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function pseudoElementFound(string $pseudoElement, string $unexpectedLocation)
|
||||
public static function pseudoElementFound(string $pseudoElement, string $unexpectedLocation): self
|
||||
{
|
||||
return new self(sprintf('Unexpected pseudo-element "::%s" found %s.', $pseudoElement, $unexpectedLocation));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function unclosedString(int $position)
|
||||
public static function unclosedString(int $position): self
|
||||
{
|
||||
return new self(sprintf('Unclosed/invalid string at %s.', $position));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function nestedNot()
|
||||
public static function nestedNot(): self
|
||||
{
|
||||
return new self('Got nested ::not().');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function stringAsFunctionArgument()
|
||||
public static function notAtTheStartOfASelector(string $pseudoElement): self
|
||||
{
|
||||
return new self(sprintf('Got immediate child pseudo-element ":%s" not at the start of a selector', $pseudoElement));
|
||||
}
|
||||
|
||||
public static function stringAsFunctionArgument(): self
|
||||
{
|
||||
return new self('String not allowed as function argument.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user