Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions config/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -102,36 +102,12 @@ parameters:
count: 2
path: ../src/CSSList/KeyFrame.php

-
message: '#^Default value of the parameter \#2 \$bIncludeEnd \(false\) of method Sabberworm\\CSS\\Parsing\\ParserState\:\:consumeUntil\(\) is incompatible with type string\.$#'
identifier: parameter.defaultValue
count: 1
path: ../src/Parsing/ParserState.php

-
message: '#^Default value of the parameter \#3 \$consumeEnd \(false\) of method Sabberworm\\CSS\\Parsing\\ParserState\:\:consumeUntil\(\) is incompatible with type string\.$#'
identifier: parameter.defaultValue
count: 1
path: ../src/Parsing/ParserState.php

-
message: '#^Loose comparison via "\=\=" is not allowed\.$#'
identifier: equal.notAllowed
count: 1
path: ../src/Parsing/ParserState.php

-
message: '#^Only booleans are allowed in a negated boolean, string given\.$#'
identifier: booleanNot.exprNotBoolean
count: 1
path: ../src/Parsing/ParserState.php

-
message: '#^Only booleans are allowed in an if condition, string given\.$#'
identifier: if.condNotBoolean
count: 1
path: ../src/Parsing/ParserState.php

-
message: '#^PHPDoc tag @return with type array\<int, Sabberworm\\CSS\\Comment\\Comment\>\|void is not subtype of native type array\.$#'
identifier: return.phpDocType
Expand Down
8 changes: 4 additions & 4 deletions src/Parsing/ParserState.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,16 +335,16 @@ public function isEnd(): bool

/**
* @param array<array-key, string>|string $stopCharacters
* @param string $bIncludeEnd
* @param string $consumeEnd
* @param bool $includeEnd
* @param bool $consumeEnd
* @param array<int, Comment> $comments
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*/
public function consumeUntil(
$stopCharacters,
$bIncludeEnd = false,
$includeEnd = false,
$consumeEnd = false,
array &$comments = []
): string {
Expand All @@ -355,7 +355,7 @@ public function consumeUntil(
while (!$this->isEnd()) {
$character = $this->consume(1);
if (\in_array($character, $stopCharacters, true)) {
if ($bIncludeEnd) {
if ($includeEnd) {
$consumedCharacters .= $character;
} elseif (!$consumeEnd) {
$this->currentPosition -= $this->strlen($character);
Expand Down