Skip to content

Commit fea9a1d

Browse files
authored
[CLEANUP] Reorder methods in DeclarationBlockTest (#1434)
Move the private helper methods to the end, as they are used in multiple tests both above and below their current location.
1 parent ca51e51 commit fea9a1d

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

tests/Unit/RuleSet/DeclarationBlockTest.php

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -376,32 +376,6 @@ public function parseConsumesToEofIfNoClosingBraceAfterInvalidSelector(
376376
self::assertTrue($parserState->isEnd());
377377
}
378378

379-
/**
380-
* @return array<string>
381-
*/
382-
private static function getSelectorsAsStrings(DeclarationBlock $declarationBlock): array
383-
{
384-
return \array_map(
385-
static function (Selector $selectorObject): string {
386-
return $selectorObject->getSelector();
387-
},
388-
$declarationBlock->getSelectors()
389-
);
390-
}
391-
392-
/**
393-
* @return list<string>
394-
*/
395-
private static function getCommentsAsStrings(DeclarationBlock $declarationBlock): array
396-
{
397-
return \array_map(
398-
static function (Comment $comment): string {
399-
return $comment->getComment();
400-
},
401-
$declarationBlock->getComments()
402-
);
403-
}
404-
405379
/**
406380
* @test
407381
*/
@@ -560,4 +534,30 @@ public function setSelectorsThrowsExceptionWithInvalidSelector(string $selector)
560534

561535
$subject->setSelectors($selector);
562536
}
537+
538+
/**
539+
* @return array<string>
540+
*/
541+
private static function getSelectorsAsStrings(DeclarationBlock $declarationBlock): array
542+
{
543+
return \array_map(
544+
static function (Selector $selectorObject): string {
545+
return $selectorObject->getSelector();
546+
},
547+
$declarationBlock->getSelectors()
548+
);
549+
}
550+
551+
/**
552+
* @return list<string>
553+
*/
554+
private static function getCommentsAsStrings(DeclarationBlock $declarationBlock): array
555+
{
556+
return \array_map(
557+
static function (Comment $comment): string {
558+
return $comment->getComment();
559+
},
560+
$declarationBlock->getComments()
561+
);
562+
}
563563
}

0 commit comments

Comments
 (0)