Skip to content

Commit 836b5b6

Browse files
committed
Remove use of PHP language features incompatible with 5.6
1 parent 1ff84ef commit 836b5b6

File tree

3 files changed

+38
-12
lines changed

3 files changed

+38
-12
lines changed

src/CSSList/CSSBlockList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected function allRuleSets(array &$aResult)
7171
*
7272
* @see RuleSet->getRules()
7373
*/
74-
public function getAllValues($element = null, bool $searchInFunctionArguments = false): array
74+
public function getAllValues($element = null, $searchInFunctionArguments = false)
7575
{
7676
$searchString = null;
7777
if ($element === null) {

tests/Unit/CSSList/CSSBlockListTest.php

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ final class CSSBlockListTest extends TestCase
2020
{
2121
/**
2222
* @test
23+
*
24+
* @return void
2325
*/
24-
public function getAllValuesWhenNoContentSetReturnsEmptyArray(): void
26+
public function getAllValuesWhenNoContentSetReturnsEmptyArray()
2527
{
2628
$subject = new ConcreteCSSBlockList();
2729

@@ -30,8 +32,10 @@ public function getAllValuesWhenNoContentSetReturnsEmptyArray(): void
3032

3133
/**
3234
* @test
35+
*
36+
* @return void
3337
*/
34-
public function getAllValuesReturnsOneValueDirectlySetAsContent(): void
38+
public function getAllValuesReturnsOneValueDirectlySetAsContent()
3539
{
3640
$subject = new ConcreteCSSBlockList();
3741

@@ -50,8 +54,10 @@ public function getAllValuesReturnsOneValueDirectlySetAsContent(): void
5054

5155
/**
5256
* @test
57+
*
58+
* @return void
5359
*/
54-
public function getAllValuesReturnsMultipleValuesDirectlySetAsContentInOneDeclarationBlock(): void
60+
public function getAllValuesReturnsMultipleValuesDirectlySetAsContentInOneDeclarationBlock()
5561
{
5662
$subject = new ConcreteCSSBlockList();
5763

@@ -74,8 +80,10 @@ public function getAllValuesReturnsMultipleValuesDirectlySetAsContentInOneDeclar
7480

7581
/**
7682
* @test
83+
*
84+
* @return void
7785
*/
78-
public function getAllValuesReturnsMultipleValuesDirectlySetAsContentInMultipleDeclarationBlocks(): void
86+
public function getAllValuesReturnsMultipleValuesDirectlySetAsContentInMultipleDeclarationBlocks()
7987
{
8088
$subject = new ConcreteCSSBlockList();
8189

@@ -99,8 +107,10 @@ public function getAllValuesReturnsMultipleValuesDirectlySetAsContentInMultipleD
99107

100108
/**
101109
* @test
110+
*
111+
* @return void
102112
*/
103-
public function getAllValuesReturnsValuesWithinAtRuleBlockList(): void
113+
public function getAllValuesReturnsValuesWithinAtRuleBlockList()
104114
{
105115
$subject = new ConcreteCSSBlockList();
106116

@@ -121,8 +131,10 @@ public function getAllValuesReturnsValuesWithinAtRuleBlockList(): void
121131

122132
/**
123133
* @test
134+
*
135+
* @return void
124136
*/
125-
public function getAllValuesWithElementProvidedReturnsOnlyValuesWithinThatElement(): void
137+
public function getAllValuesWithElementProvidedReturnsOnlyValuesWithinThatElement()
126138
{
127139
$subject = new ConcreteCSSBlockList();
128140

@@ -146,8 +158,10 @@ public function getAllValuesWithElementProvidedReturnsOnlyValuesWithinThatElemen
146158

147159
/**
148160
* @test
161+
*
162+
* @return void
149163
*/
150-
public function getAllValuesWithSearchStringProvidedReturnsOnlyValuesFromMatchingRules(): void
164+
public function getAllValuesWithSearchStringProvidedReturnsOnlyValuesFromMatchingRules()
151165
{
152166
$subject = new ConcreteCSSBlockList();
153167

@@ -170,8 +184,10 @@ public function getAllValuesWithSearchStringProvidedReturnsOnlyValuesFromMatchin
170184

171185
/**
172186
* @test
187+
*
188+
* @return void
173189
*/
174-
public function getAllValuesByDefaultDoesNotReturnValuesInFunctionArguments(): void
190+
public function getAllValuesByDefaultDoesNotReturnValuesInFunctionArguments()
175191
{
176192
$subject = new ConcreteCSSBlockList();
177193

@@ -191,8 +207,10 @@ public function getAllValuesByDefaultDoesNotReturnValuesInFunctionArguments(): v
191207

192208
/**
193209
* @test
210+
*
211+
* @return void
194212
*/
195-
public function getAllValuesWithSearchInFunctionArgumentsReturnsValuesInFunctionArguments(): void
213+
public function getAllValuesWithSearchInFunctionArgumentsReturnsValuesInFunctionArguments()
196214
{
197215
$subject = new ConcreteCSSBlockList();
198216

tests/Unit/CSSList/Fixtures/ConcreteCSSBlockList.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@
99

1010
final class ConcreteCSSBlockList extends CSSBlockList
1111
{
12-
public function isRootList(): bool
12+
/**
13+
* @return never
14+
*/
15+
public function isRootList()
1316
{
1417
throw new \BadMethodCallException('Not implemented', 1740395831);
1518
}
1619

17-
public function render(OutputFormat $outputFormat): string
20+
/**
21+
* @param OutputFormat|null $outputFormat
22+
*
23+
* @return never
24+
*/
25+
public function render($outputFormat)
1826
{
1927
throw new \BadMethodCallException('Not implemented', 1740395836);
2028
}

0 commit comments

Comments
 (0)