Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 28ef080

Browse files
committed
chore: initialize formats
1 parent 0a13832 commit 28ef080

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Rule/CssColor.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ class CssColor extends AbstractRule implements RuleInterface
6969
self::FORMAT_HSLA => self::PATTERN_HSLA
7070
];
7171

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

7575
public function __construct(
7676
?array $formats = null,
7777
?string $message = null
7878
)
7979
{
80-
$this->formats = $formats ?? self::COLOR_FORMATS;
80+
$this->formats = $formats ?? $this->formats;
8181
$this->message = $message ?? $this->message;
8282
}
8383

0 commit comments

Comments
 (0)