Skip to content

Commit 9b78441

Browse files
CS fixes
1 parent cb23e97 commit 9b78441

21 files changed

+47
-47
lines changed

Exception/SyntaxErrorException.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ class SyntaxErrorException extends ParseException
2525
{
2626
public static function unexpectedToken(string $expectedValue, Token $foundToken): self
2727
{
28-
return new self(sprintf('Expected %s, but %s found.', $expectedValue, $foundToken));
28+
return new self(\sprintf('Expected %s, but %s found.', $expectedValue, $foundToken));
2929
}
3030

3131
public static function pseudoElementFound(string $pseudoElement, string $unexpectedLocation): self
3232
{
33-
return new self(sprintf('Unexpected pseudo-element "::%s" found %s.', $pseudoElement, $unexpectedLocation));
33+
return new self(\sprintf('Unexpected pseudo-element "::%s" found %s.', $pseudoElement, $unexpectedLocation));
3434
}
3535

3636
public static function unclosedString(int $position): self
3737
{
38-
return new self(sprintf('Unclosed/invalid string at %s.', $position));
38+
return new self(\sprintf('Unclosed/invalid string at %s.', $position));
3939
}
4040

4141
public static function nestedNot(): self
@@ -45,7 +45,7 @@ public static function nestedNot(): self
4545

4646
public static function notAtTheStartOfASelector(string $pseudoElement): self
4747
{
48-
return new self(sprintf('Got immediate child pseudo-element ":%s" not at the start of a selector', $pseudoElement));
48+
return new self(\sprintf('Got immediate child pseudo-element ":%s" not at the start of a selector', $pseudoElement));
4949
}
5050

5151
public static function stringAsFunctionArgument(): self

Node/AttributeNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __toString(): string
7373
$attribute = $this->namespace ? $this->namespace.'|'.$this->attribute : $this->attribute;
7474

7575
return 'exists' === $this->operator
76-
? sprintf('%s[%s[%s]]', $this->getNodeName(), $this->selector, $attribute)
77-
: sprintf("%s[%s[%s %s '%s']]", $this->getNodeName(), $this->selector, $attribute, $this->operator, $this->value);
76+
? \sprintf('%s[%s[%s]]', $this->getNodeName(), $this->selector, $attribute)
77+
: \sprintf("%s[%s[%s %s '%s']]", $this->getNodeName(), $this->selector, $attribute, $this->operator, $this->value);
7878
}
7979
}

Node/ClassNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ public function getSpecificity(): Specificity
4949

5050
public function __toString(): string
5151
{
52-
return sprintf('%s[%s.%s]', $this->getNodeName(), $this->selector, $this->name);
52+
return \sprintf('%s[%s.%s]', $this->getNodeName(), $this->selector, $this->name);
5353
}
5454
}

Node/CombinedSelectorNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ public function __toString(): string
5858
{
5959
$combinator = ' ' === $this->combinator ? '<followed>' : $this->combinator;
6060

61-
return sprintf('%s[%s %s %s]', $this->getNodeName(), $this->selector, $combinator, $this->subSelector);
61+
return \sprintf('%s[%s %s %s]', $this->getNodeName(), $this->selector, $combinator, $this->subSelector);
6262
}
6363
}

Node/ElementNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ public function __toString(): string
5151
{
5252
$element = $this->element ?: '*';
5353

54-
return sprintf('%s[%s]', $this->getNodeName(), $this->namespace ? $this->namespace.'|'.$element : $element);
54+
return \sprintf('%s[%s]', $this->getNodeName(), $this->namespace ? $this->namespace.'|'.$element : $element);
5555
}
5656
}

Node/FunctionNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ public function __toString(): string
6666
{
6767
$arguments = implode(', ', array_map(fn (Token $token) => "'".$token->getValue()."'", $this->arguments));
6868

69-
return sprintf('%s[%s:%s(%s)]', $this->getNodeName(), $this->selector, $this->name, $arguments ? '['.$arguments.']' : '');
69+
return \sprintf('%s[%s:%s(%s)]', $this->getNodeName(), $this->selector, $this->name, $arguments ? '['.$arguments.']' : '');
7070
}
7171
}

Node/HashNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ public function getSpecificity(): Specificity
4949

5050
public function __toString(): string
5151
{
52-
return sprintf('%s[%s#%s]', $this->getNodeName(), $this->selector, $this->id);
52+
return \sprintf('%s[%s#%s]', $this->getNodeName(), $this->selector, $this->id);
5353
}
5454
}

Node/NegationNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ public function getSpecificity(): Specificity
4949

5050
public function __toString(): string
5151
{
52-
return sprintf('%s[%s:not(%s)]', $this->getNodeName(), $this->selector, $this->subSelector);
52+
return \sprintf('%s[%s:not(%s)]', $this->getNodeName(), $this->selector, $this->subSelector);
5353
}
5454
}

Node/PseudoNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ public function getSpecificity(): Specificity
4949

5050
public function __toString(): string
5151
{
52-
return sprintf('%s[%s:%s]', $this->getNodeName(), $this->selector, $this->identifier);
52+
return \sprintf('%s[%s:%s]', $this->getNodeName(), $this->selector, $this->identifier);
5353
}
5454
}

Node/SelectorNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ public function getSpecificity(): Specificity
4949

5050
public function __toString(): string
5151
{
52-
return sprintf('%s[%s%s]', $this->getNodeName(), $this->tree, $this->pseudoElement ? '::'.$this->pseudoElement : '');
52+
return \sprintf('%s[%s%s]', $this->getNodeName(), $this->tree, $this->pseudoElement ? '::'.$this->pseudoElement : '');
5353
}
5454
}

0 commit comments

Comments
 (0)