Skip to content

Commit 5d53656

Browse files
committed
Changes suggested in code review
1 parent 456e4d5 commit 5d53656

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

src/OutputFormat.php

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,9 @@ public function getBeforeAtRuleBlock(): string
443443
/**
444444
* @return $this fluent interface
445445
*/
446-
public function setBeforeAtRuleBlock(string $whitespace): self
446+
public function setBeforeAtRuleBlock(string $content): self
447447
{
448-
$this->sBeforeAtRuleBlock = $whitespace;
448+
$this->sBeforeAtRuleBlock = $content;
449449

450450
return $this;
451451
}
@@ -461,9 +461,9 @@ public function getAfterAtRuleBlock(): string
461461
/**
462462
* @return $this fluent interface
463463
*/
464-
public function setAfterAtRuleBlock(string $whitespace): self
464+
public function setAfterAtRuleBlock(string $content): self
465465
{
466-
$this->sAfterAtRuleBlock = $whitespace;
466+
$this->sAfterAtRuleBlock = $content;
467467

468468
return $this;
469469
}
@@ -533,29 +533,33 @@ public function getSpaceBeforeListArgumentSeparators(): array
533533
}
534534

535535
/**
536-
* @param array<non-empty-string, string> $separators
536+
* @param array<non-empty-string, string> $separatorSpaces
537537
*
538538
* @return $this fluent interface
539539
*/
540-
public function setSpaceBeforeListArgumentSeparators(array $separators): self
540+
public function setSpaceBeforeListArgumentSeparators(array $separatorSpaces): self
541541
{
542-
$this->aSpaceBeforeListArgumentSeparators = $separators;
542+
$this->aSpaceBeforeListArgumentSeparators = $separatorSpaces;
543543

544544
return $this;
545545
}
546546

547547
/**
548+
* @return string|array<non-empty-string, string>
549+
*
548550
* @internal
549551
*/
550-
public function getSpaceAfterListArgumentSeparator(): string
552+
public function getSpaceAfterListArgumentSeparator()
551553
{
552554
return $this->sSpaceAfterListArgumentSeparator;
553555
}
554556

555557
/**
558+
* @param string|array<non-empty-string, string> $whitespace
559+
*
556560
* @return $this fluent interface
557561
*/
558-
public function setSpaceAfterListArgumentSeparator(string $whitespace): self
562+
public function setSpaceAfterListArgumentSeparator($whitespace): self
559563
{
560564
$this->sSpaceAfterListArgumentSeparator = $whitespace;
561565

@@ -573,13 +577,13 @@ public function getSpaceAfterListArgumentSeparators(): array
573577
}
574578

575579
/**
576-
* @param array<non-empty-string, string> $separators
580+
* @param array<non-empty-string, string> $separatorSpaces
577581
*
578582
* @return $this fluent interface
579583
*/
580-
public function setSpaceAfterListArgumentSeparators(array $separators): self
584+
public function setSpaceAfterListArgumentSeparators(array $separatorSpaces): self
581585
{
582-
$this->aSpaceAfterListArgumentSeparators = $separators;
586+
$this->aSpaceAfterListArgumentSeparators = $separatorSpaces;
583587

584588
return $this;
585589
}
@@ -613,9 +617,9 @@ public function getBeforeDeclarationBlock(): string
613617
/**
614618
* @return $this fluent interface
615619
*/
616-
public function setBeforeDeclarationBlock(string $whitespace): self
620+
public function setBeforeDeclarationBlock(string $content): self
617621
{
618-
$this->sBeforeDeclarationBlock = $whitespace;
622+
$this->sBeforeDeclarationBlock = $content;
619623

620624
return $this;
621625
}
@@ -631,9 +635,9 @@ public function getAfterDeclarationBlockSelectors(): string
631635
/**
632636
* @return $this fluent interface
633637
*/
634-
public function setAfterDeclarationBlockSelectors(string $whitespace): self
638+
public function setAfterDeclarationBlockSelectors(string $content): self
635639
{
636-
$this->sAfterDeclarationBlockSelectors = $whitespace;
640+
$this->sAfterDeclarationBlockSelectors = $content;
637641

638642
return $this;
639643
}
@@ -649,9 +653,9 @@ public function getAfterDeclarationBlock(): string
649653
/**
650654
* @return $this fluent interface
651655
*/
652-
public function setAfterDeclarationBlock(string $whitespace): self
656+
public function setAfterDeclarationBlock(string $content): self
653657
{
654-
$this->sAfterDeclarationBlock = $whitespace;
658+
$this->sAfterDeclarationBlock = $content;
655659

656660
return $this;
657661
}
@@ -667,9 +671,9 @@ public function getIndentation(): string
667671
/**
668672
* @return $this fluent interface
669673
*/
670-
public function setIndentation(string $sIndentation): self
674+
public function setIndentation(string $indentation): self
671675
{
672-
$this->sIndentation = $sIndentation;
676+
$this->sIndentation = $indentation;
673677

674678
return $this;
675679
}

tests/OutputFormatTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function spaceAfterListArgumentSeparatorComplexDeprecated(): void
107107
self::assertSame(
108108
'.main, .test {font: italic normal bold 16px/1.2 "Helvetica", Verdana, sans-serif;background: white;}'
109109
. "\n@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}}",
110-
$this->document->render(OutputFormat::create()->setSpaceAfterListArgumentSeparators([
110+
$this->document->render(OutputFormat::create()->setSpaceAfterListArgumentSeparator([
111111
'default' => ' ',
112112
',' => "\t",
113113
'/' => '',

0 commit comments

Comments
 (0)