Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions tests/Unit/RuleSet/DeclarationBlockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,32 +376,6 @@ public function parseConsumesToEofIfNoClosingBraceAfterInvalidSelector(
self::assertTrue($parserState->isEnd());
}

/**
* @return array<string>
*/
private static function getSelectorsAsStrings(DeclarationBlock $declarationBlock): array
{
return \array_map(
static function (Selector $selectorObject): string {
return $selectorObject->getSelector();
},
$declarationBlock->getSelectors()
);
}

/**
* @return list<string>
*/
private static function getCommentsAsStrings(DeclarationBlock $declarationBlock): array
{
return \array_map(
static function (Comment $comment): string {
return $comment->getComment();
},
$declarationBlock->getComments()
);
}

/**
* @test
*/
Expand Down Expand Up @@ -560,4 +534,30 @@ public function setSelectorsThrowsExceptionWithInvalidSelector(string $selector)

$subject->setSelectors($selector);
}

/**
* @return array<string>
*/
private static function getSelectorsAsStrings(DeclarationBlock $declarationBlock): array
{
return \array_map(
static function (Selector $selectorObject): string {
return $selectorObject->getSelector();
},
$declarationBlock->getSelectors()
);
}

/**
* @return list<string>
*/
private static function getCommentsAsStrings(DeclarationBlock $declarationBlock): array
{
return \array_map(
static function (Comment $comment): string {
return $comment->getComment();
},
$declarationBlock->getComments()
);
}
}