Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions src/CSSList/CSSList.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,16 @@ public function getContents(): array
return $this->contents;
}

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array
{
throw new \BadMethodCallException('`getArrayRepresentation` is not yet implemented for `' . self::class . '`');
}

/**
* @param list<Selector> $selectors1
* @param list<Selector> $selectors2
Expand Down
10 changes: 10 additions & 0 deletions src/Comment/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,14 @@ public function render(OutputFormat $outputFormat): string
{
return '/*' . $this->commentText . '*/';
}

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array
{
throw new \BadMethodCallException('`getArrayRepresentation` is not yet implemented for `' . self::class . '`');
}
}
10 changes: 10 additions & 0 deletions src/Property/CSSNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,14 @@ public function atRuleArgs(): array
}
return $result;
}

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array
{
throw new \BadMethodCallException('`getArrayRepresentation` is not yet implemented for `' . self::class . '`');
}
}
10 changes: 10 additions & 0 deletions src/Property/Charset.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,14 @@ public function atRuleArgs(): CSSString
{
return $this->charset;
}

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array
{
throw new \BadMethodCallException('`getArrayRepresentation` is not yet implemented for `' . self::class . '`');
}
}
10 changes: 10 additions & 0 deletions src/Property/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,14 @@ public function getMediaQuery(): ?string
{
return $this->mediaQuery;
}

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array
{
throw new \BadMethodCallException('`getArrayRepresentation` is not yet implemented for `' . self::class . '`');
}
}
10 changes: 10 additions & 0 deletions src/Property/Selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,14 @@ public function render(OutputFormat $outputFormat): string
{
return $this->getSelector();
}

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array
{
throw new \BadMethodCallException('`getArrayRepresentation` is not yet implemented for `' . self::class . '`');
}
}
7 changes: 7 additions & 0 deletions src/Renderable.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@
interface Renderable
{
public function render(OutputFormat $outputFormat): string;

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array;
}
10 changes: 10 additions & 0 deletions src/Rule/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,14 @@ public function render(OutputFormat $outputFormat): string
$result .= ';';
return $result;
}

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array
{
throw new \BadMethodCallException('`getArrayRepresentation` is not yet implemented for `' . self::class . '`');
}
}
10 changes: 10 additions & 0 deletions src/RuleSet/DeclarationBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,16 @@ public function render(OutputFormat $outputFormat): string
return $result;
}

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array
{
throw new \BadMethodCallException('`getArrayRepresentation` is not yet implemented for `' . self::class . '`');
}

/**
* @param list<Comment> $comments
*
Expand Down
10 changes: 10 additions & 0 deletions src/RuleSet/RuleSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,16 @@ protected function renderRules(OutputFormat $outputFormat): string
return $formatter->removeLastSemicolon($result);
}

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array
{
throw new \BadMethodCallException('`getArrayRepresentation` is not yet implemented for `' . self::class . '`');
}

/**
* @return int negative if `$first` is before `$second`; zero if they have the same position; positive otherwise
*
Expand Down
10 changes: 10 additions & 0 deletions src/Value/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ public static function parsePrimitiveValue(ParserState $parserState)
return $value;
}

/**
* @internal
*
* @return array<string, bool|int|float|string|list<array<string, mixed>>>
*/
public function getArrayRepresentation(): array
{
throw new \BadMethodCallException('`getArrayRepresentation` is not yet implemented for `' . self::class . '`');
}

/**
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
Expand Down
12 changes: 12 additions & 0 deletions tests/Unit/CSSList/CSSListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,4 +380,16 @@ public function parseListAtRootLevelSkipsErroneousClosingBraceAndParsesFollowing

self::assertSame($followingContent, $subject->render(new OutputFormat()));
}

/**
* @test
*/
public function getArrayRepresentationThrowsException(): void
{
$this->expectException(\BadMethodCallException::class);

$subject = new ConcreteCSSList();

$subject->getArrayRepresentation();
}
}
12 changes: 12 additions & 0 deletions tests/Unit/Comment/CommentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,16 @@ public function getLineNumberReturnsLineNumberProvidedToConstructor(): void

self::assertSame($lineNumber, $subject->getLineNumber());
}

/**
* @test
*/
public function getArrayRepresentationThrowsException(): void
{
$this->expectException(\BadMethodCallException::class);

$subject = new Comment();

$subject->getArrayRepresentation();
}
}
10 changes: 10 additions & 0 deletions tests/Unit/Property/CSSNamespaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,14 @@ public function implementsCSSListItem(): void
{
self::assertInstanceOf(CSSListItem::class, $this->subject);
}

/**
* @test
*/
public function getArrayRepresentationThrowsException(): void
{
$this->expectException(\BadMethodCallException::class);

$this->subject->getArrayRepresentation();
}
}
10 changes: 10 additions & 0 deletions tests/Unit/Property/CharsetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,14 @@ public function implementsCSSListItem(): void
{
self::assertInstanceOf(CSSListItem::class, $this->subject);
}

/**
* @test
*/
public function getArrayRepresentationThrowsException(): void
{
$this->expectException(\BadMethodCallException::class);

$this->subject->getArrayRepresentation();
}
}
10 changes: 10 additions & 0 deletions tests/Unit/Property/ImportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,14 @@ public function implementsCSSListItem(): void
{
self::assertInstanceOf(CSSListItem::class, $this->subject);
}

/**
* @test
*/
public function getArrayRepresentationThrowsException(): void
{
$this->expectException(\BadMethodCallException::class);

$this->subject->getArrayRepresentation();
}
}
12 changes: 12 additions & 0 deletions tests/Unit/Property/SelectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,16 @@ public function doesNotCleanupSpacesWithinAttributeSelector(): void

self::assertSame('a[title="extra space"]', $subject->getSelector());
}

/**
* @test
*/
public function getArrayRepresentationThrowsException(): void
{
$this->expectException(\BadMethodCallException::class);

$subject = new Selector('a');

$subject->getArrayRepresentation();
}
}
12 changes: 12 additions & 0 deletions tests/Unit/Rule/RuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,16 @@ static function ($component): string {

self::assertSame($expectedTypeClassnames, $actualClassnames);
}

/**
* @test
*/
public function getArrayRepresentationThrowsException(): void
{
$this->expectException(\BadMethodCallException::class);

$subject = new Rule('todo');

$subject->getArrayRepresentation();
}
}
10 changes: 10 additions & 0 deletions tests/Unit/RuleSet/DeclarationBlockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,16 @@ public function setSelectorsThrowsExceptionWithInvalidSelector(string $selector)
$subject->setSelectors($selector);
}

/**
* @test
*/
public function getArrayRepresentationThrowsException(): void
{
$this->expectException(\BadMethodCallException::class);

$this->subject->getArrayRepresentation();
}

/**
* @return list<string>
*/
Expand Down
10 changes: 10 additions & 0 deletions tests/Unit/RuleSet/RuleSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,14 @@ public function getLineNumberReturnsLineNumberPassedToConstructor(?int $lineNumb

self::assertSame($lineNumber, $result);
}

/**
* @test
*/
public function getArrayRepresentationThrowsException(): void
{
$this->expectException(\BadMethodCallException::class);

$this->subject->getArrayRepresentation();
}
}
12 changes: 12 additions & 0 deletions tests/Unit/Value/ValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,16 @@ public function parsesArithmeticWithMalformedOperandsInFunctions(string $leftOpe
$subject->render(OutputFormat::createCompact())
);
}

/**
* @test
*/
public function getArrayRepresentationThrowsException(): void
{
$this->expectException(\BadMethodCallException::class);

$subject = new ConcreteValue();

$subject->getArrayRepresentation();
}
}