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
12 changes: 0 additions & 12 deletions config/phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
parameters:
ignoreErrors:
-
message: '#^Only booleans are allowed in an if condition, string given\.$#'
identifier: if.condNotBoolean
count: 1
path: ../src/CSSList/AtRuleBlockList.php

-
message: '#^Call to function is_string\(\) with Sabberworm\\CSS\\Parsing\\ParserState will always evaluate to false\.$#'
identifier: function.impossibleType
Expand Down Expand Up @@ -54,12 +48,6 @@ parameters:
count: 1
path: ../src/Parsing/ParserState.php

-
message: '#^Only booleans are allowed in an if condition, Sabberworm\\CSS\\Value\\RuleValueList\|string\|null given\.$#'
identifier: if.condNotBoolean
count: 1
path: ../src/Rule/Rule.php

-
message: '#^Parameters should have "string" types as the only types passed to this method$#'
identifier: typePerfect.narrowPublicClassMethodParamType
Expand Down
2 changes: 1 addition & 1 deletion src/CSSList/AtRuleBlockList.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function render(OutputFormat $outputFormat): string
$result = $formatter->comments($this);
$result .= $outputFormat->getContentBeforeAtRuleBlock();
$arguments = $this->arguments;
if ($arguments) {
if ($arguments !== '') {
$arguments = ' ' . $arguments;
}
$result .= "@{$this->type}$arguments{$formatter->spaceBeforeOpeningBrace()}{";
Expand Down
2 changes: 1 addition & 1 deletion src/Rule/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function addValue($value, string $type = ' '): void
if (!($this->value instanceof RuleValueList) || $this->value->getListSeparator() !== $type) {
$currentValue = $this->value;
$this->value = new RuleValueList($type, $this->getLineNumber());
if ($currentValue) {
if ($currentValue !== null && $currentValue !== '') {
$this->value->addListComponent($currentValue);
}
}
Expand Down