Skip to content

Commit 44eb684

Browse files
authored
[CLEANUP] Rector: Add strict return array type based on created empty array and returned (#556)
This applies the rule AddTestsVoidReturnTypeWhereNoReturnRector. For Details see: https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#returntypefromstrictnewarrayrector Signed-off-by: Daniel Ziegenberg <[email protected]>
1 parent 55b1ddb commit 44eb684

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Parsing/ParserState.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function parseCharacter($bIsForIdentifier)
231231
* @throws UnexpectedEOFException
232232
* @throws UnexpectedTokenException
233233
*/
234-
public function consumeWhiteSpace()
234+
public function consumeWhiteSpace(): array
235235
{
236236
$aComments = [];
237237
do {

src/Property/CSSNamespace.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function atRuleName()
115115
/**
116116
* @return array<int, string>
117117
*/
118-
public function atRuleArgs()
118+
public function atRuleArgs(): array
119119
{
120120
$aResult = [$this->mUrl];
121121
if ($this->sPrefix) {

src/Property/Import.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function atRuleName()
9898
/**
9999
* @return array<int, URL|string>
100100
*/
101-
public function atRuleArgs()
101+
public function atRuleArgs(): array
102102
{
103103
$aResult = [$this->oLocation];
104104
if ($this->sMediaQuery) {

src/Rule/Rule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public function setValues(array $aSpaceSeparatedValues)
238238
* Old-Style 2-dimensional array returned. Retained for (some) backwards-compatibility.
239239
* Use `getValue()` instead and check for the existence of a (nested set of) ValueList object(s).
240240
*/
241-
public function getValues()
241+
public function getValues(): array
242242
{
243243
if (!$this->mValue instanceof RuleValueList) {
244244
return [[$this->mValue]];

0 commit comments

Comments
 (0)