Skip to content

Commit c0d5062

Browse files
committed
[TASK] Only allow string for some OutputFormat properties
`sBeforeAfterListArgumentSeparator` and `sSpaceAfterListArgumentSeparator` now can only hold strings, and no longer arrays (which was deprecated in V8.8.0).
1 parent cb3ae4b commit c0d5062

File tree

2 files changed

+4
-34
lines changed

2 files changed

+4
-34
lines changed

src/OutputFormat.php

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ class OutputFormat
9494
/**
9595
* This is what’s inserted before the separator in value lists, by default.
9696
*
97-
* `array` is deprecated in version 8.8.0, and will be removed in version 9.0.0.
98-
* To set the spacing for specific separators, use {@see $aSpaceBeforeListArgumentSeparators} instead.
99-
*
100-
* @var string|array<non-empty-string, string>
97+
* @var string
10198
*/
10299
public $sSpaceBeforeListArgumentSeparator = '';
103100

@@ -111,10 +108,7 @@ class OutputFormat
111108
/**
112109
* This is what’s inserted after the separator in value lists, by default.
113110
*
114-
* `array` is deprecated in version 8.8.0, and will be removed in version 9.0.0.
115-
* To set the spacing for specific separators, use {@see $aSpaceAfterListArgumentSeparators} instead.
116-
*
117-
* @var string|array<non-empty-string, string>
111+
* @var string
118112
*/
119113
public $sSpaceAfterListArgumentSeparator = '';
120114

@@ -545,21 +539,17 @@ public function setSpaceBeforeListArgumentSeparators(array $separatorSpaces): se
545539
}
546540

547541
/**
548-
* @return string|array<non-empty-string, string>
549-
*
550542
* @internal
551543
*/
552-
public function getSpaceAfterListArgumentSeparator()
544+
public function getSpaceAfterListArgumentSeparator(): string
553545
{
554546
return $this->sSpaceAfterListArgumentSeparator;
555547
}
556548

557549
/**
558-
* @param string|array<non-empty-string, string> $whitespace
559-
*
560550
* @return $this fluent interface
561551
*/
562-
public function setSpaceAfterListArgumentSeparator($whitespace): self
552+
public function setSpaceAfterListArgumentSeparator(string $whitespace): self
563553
{
564554
$this->sSpaceAfterListArgumentSeparator = $whitespace;
565555

tests/OutputFormatTest.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,26 +96,6 @@ public function spaceAfterListArgumentSeparator(): void
9696
);
9797
}
9898

99-
/**
100-
* @test
101-
*
102-
* @deprecated since version 8.8.0; will be removed in version 9.0.
103-
* Use `setSpaceAfterListArgumentSeparators()` to set different spacing per separator.
104-
*/
105-
public function spaceAfterListArgumentSeparatorComplexDeprecated(): void
106-
{
107-
self::assertSame(
108-
'.main, .test {font: italic normal bold 16px/1.2 "Helvetica", Verdana, sans-serif;background: white;}'
109-
. "\n@media screen {.main {background-size: 100% 100%;font-size: 1.3em;background-color: #fff;}}",
110-
$this->document->render(OutputFormat::create()->setSpaceAfterListArgumentSeparator([
111-
'default' => ' ',
112-
',' => "\t",
113-
'/' => '',
114-
' ' => '',
115-
]))
116-
);
117-
}
118-
11999
/**
120100
* @test
121101
*/

0 commit comments

Comments
 (0)