Skip to content

Commit 86d7c80

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 f7914f8 commit 86d7c80

File tree

2 files changed

+5
-31
lines changed

2 files changed

+5
-31
lines changed

src/OutputFormat.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,11 @@ class OutputFormat
124124
/**
125125
* This is what’s inserted before the separator in value lists, by default.
126126
*
127+
* <<<<<<< HEAD
127128
* `array` is deprecated in version 8.8.0, and will be removed in version 9.0.0.
128129
* To set the spacing for specific separators, use {@see $aSpaceBeforeListArgumentSeparators} instead.
129130
*
130-
* @var string|array<non-empty-string, string>
131+
* @var string
131132
*
132133
* @internal since 8.8.0, will be made private in 9.0.0
133134
*/
@@ -145,10 +146,7 @@ class OutputFormat
145146
/**
146147
* This is what’s inserted after the separator in value lists, by default.
147148
*
148-
* `array` is deprecated in version 8.8.0, and will be removed in version 9.0.0.
149-
* To set the spacing for specific separators, use {@see $aSpaceAfterListArgumentSeparators} instead.
150-
*
151-
* @var string|array<non-empty-string, string>
149+
* @var string
152150
*
153151
* @internal since 8.8.0, will be made private in 9.0.0
154152
*/
@@ -597,21 +595,17 @@ public function setSpaceBeforeListArgumentSeparators(array $separatorSpaces): se
597595
}
598596

599597
/**
600-
* @return string|array<non-empty-string, string>
601-
*
602598
* @internal
603599
*/
604-
public function getSpaceAfterListArgumentSeparator()
600+
public function getSpaceAfterListArgumentSeparator(): string
605601
{
606602
return $this->sSpaceAfterListArgumentSeparator;
607603
}
608604

609605
/**
610-
* @param string|array<non-empty-string, string> $whitespace
611-
*
612606
* @return $this fluent interface
613607
*/
614-
public function setSpaceAfterListArgumentSeparator($whitespace): self
608+
public function setSpaceAfterListArgumentSeparator(string $whitespace): self
615609
{
616610
$this->sSpaceAfterListArgumentSeparator = $whitespace;
617611

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)