Skip to content

Commit

Permalink
pint
Browse files Browse the repository at this point in the history
  • Loading branch information
markhuot committed Oct 25, 2023
1 parent 9428fc0 commit 06c06c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/actions/MapExpandedAttributeValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class MapExpandedAttributeValue
{
public function handle(?array $value, string $property, ?string $expandedProperty=null)
public function handle(?array $value, string $property, string $expandedProperty = null)
{
if ($expandedProperty === null) {
$expandedProperty = "{$property}-&";
Expand All @@ -14,8 +14,7 @@ public function handle(?array $value, string $property, ?string $expandedPropert
return collect($value['expanded'])
->mapWithKeys(fn ($value, $key) => [str_replace('&', $key, $expandedProperty) => $value])
->filter();
}
else {
} else {
return collect([$property => $value['shorthand']])
->filter();
}
Expand Down
2 changes: 1 addition & 1 deletion src/attributes/Border.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getCssRules(): Collection
return collect($this->value)
->mapWithKeys(fn ($value, $key) => match ($key) {
'width' => (new MapExpandedAttributeValue)->handle($value, 'border-width', 'border-&-width'),
default => ['border-' . $key => $value],
default => ['border-'.$key => $value],
});
}
}

0 comments on commit 06c06c0

Please sign in to comment.