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: 7 additions & 5 deletions src/Value/CSSFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ public function render(OutputFormat $outputFormat): string
*/
public function getArrayRepresentation(): array
{
$result = parent::getArrayRepresentation();

$result['name'] = $this->name;

return $result;
return \array_merge(
[
'class' => 'placeholder',
'name' => $this->name,
],
parent::getArrayRepresentation()
);
}
}
2 changes: 1 addition & 1 deletion tests/Unit/Value/ValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function parsesArithmeticInFunctions(string $operator): void
self::assertSame(
[
'class' => 'CSSFunction',
'name' => 'max',
'components' => [
[
'class' => 'Size',
Expand Down Expand Up @@ -92,7 +93,6 @@ public function parsesArithmeticInFunctions(string $operator): void
],
],
'separator' => ',',
'name' => 'max',
],
$result
);
Expand Down