Skip to content

Commit 3941983

Browse files
committed
[CLEANUP] Remove impossible conditional
The parameter `$parserState` is specified to be a `ParserState`, so it can never be a string.
1 parent e57a7ba commit 3941983

2 files changed

Lines changed: 0 additions & 9 deletions

File tree

config/phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
parameters:
22
ignoreErrors:
3-
-
4-
message: '#^Call to function is_string\(\) with Sabberworm\\CSS\\Parsing\\ParserState will always evaluate to false\.$#'
5-
identifier: function.impossibleType
6-
count: 1
7-
path: ../src/CSSList/CSSList.php
8-
93
-
104
message: '#^Loose comparison via "\=\=" is not allowed\.$#'
115
identifier: equal.notAllowed

src/CSSList/CSSList.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ public function __construct(?int $lineNumber = null)
6464
public static function parseList(ParserState $parserState, CSSList $list): void
6565
{
6666
$isRoot = $list instanceof Document;
67-
if (\is_string($parserState)) {
68-
$parserState = new ParserState($parserState, Settings::create());
69-
}
7067
$usesLenientParsing = $parserState->getSettings()->usesLenientParsing();
7168
$comments = [];
7269
while (!$parserState->isEnd()) {

0 commit comments

Comments
 (0)