diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a663e92..bbee1fd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,7 @@ Please also have a look at our (#641, #772, #774, #778, #804, #841, #873, #875, #891, #922, #923, #933, #958, #964, #967, #1000, #1044, #1134, #1136, #1137, #1139, #1140, #1141, #1145, #1162, #1163, #1166, #1172, #1174, #1178, #1179, #1181, #1183, #1184, #1186, - #1187, #1190) + #1187, #1190, #1192) - Add visibility to all class/interface constants (#469) ### Deprecated diff --git a/config/phpstan-baseline.neon b/config/phpstan-baseline.neon index bdea7afc..a84cbd81 100644 --- a/config/phpstan-baseline.neon +++ b/config/phpstan-baseline.neon @@ -36,12 +36,6 @@ parameters: count: 1 path: ../src/Rule/Rule.php - - - message: '#^Only booleans are allowed in an if condition, string given\.$#' - identifier: if.condNotBoolean - count: 1 - path: ../src/RuleSet/AtRuleSet.php - - message: '#^Loose comparison via "\!\=" is not allowed\.$#' identifier: notEqual.notAllowed diff --git a/src/RuleSet/AtRuleSet.php b/src/RuleSet/AtRuleSet.php index 1e28aa54..e2ae38a1 100644 --- a/src/RuleSet/AtRuleSet.php +++ b/src/RuleSet/AtRuleSet.php @@ -27,10 +27,9 @@ class AtRuleSet extends RuleSet implements AtRule /** * @param non-empty-string $type - * @param string $arguments * @param int<0, max> $lineNumber */ - public function __construct($type, $arguments = '', int $lineNumber = 0) + public function __construct(string $type, string $arguments = '', int $lineNumber = 0) { parent::__construct($lineNumber); $this->type = $type; @@ -45,10 +44,7 @@ public function atRuleName(): string return $this->type; } - /** - * @return string - */ - public function atRuleArgs() + public function atRuleArgs(): string { return $this->arguments; } @@ -58,7 +54,7 @@ public function render(OutputFormat $outputFormat): string $formatter = $outputFormat->getFormatter(); $result = $formatter->comments($this); $arguments = $this->arguments; - if ($arguments) { + if ($arguments !== '') { $arguments = ' ' . $arguments; } $result .= "@{$this->type}$arguments{$formatter->spaceBeforeOpeningBrace()}{";