Skip to content

Commit

Permalink
chore: initialize formats
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepimpao committed Jul 11, 2024
1 parent 0a13832 commit 28ef080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Rule/CssColor.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ class CssColor extends AbstractRule implements RuleInterface
self::FORMAT_HSLA => self::PATTERN_HSLA
];

private array $formats;
private array $formats = self::COLOR_FORMATS;
private string $message = 'The {{ name }} value is not a valid CSS color.';

public function __construct(
?array $formats = null,
?string $message = null
)
{
$this->formats = $formats ?? self::COLOR_FORMATS;
$this->formats = $formats ?? $this->formats;
$this->message = $message ?? $this->message;
}

Expand Down

0 comments on commit 28ef080

Please sign in to comment.