Skip to content

[TASK] Mark many parsing-related methods as @internal #908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2025
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Please also have a look at our

### Changed

- Mark parsing-related methods of most CSS elements as `@internal` (#907)
- Mark `OutputFormat::nextLevel()` as `@internal` (#901)
- Only allow `string` for some `OutputFormat` properties (#885)
- Make all non-private properties `@internal` (#886)
Expand Down
2 changes: 2 additions & 0 deletions src/CSSList/CSSList.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public function __construct($lineNumber = 0)
/**
* @throws UnexpectedTokenException
* @throws SourceException
*
* @internal since V8.8.0
*/
public static function parseList(ParserState $parserState, CSSList $list): void
{
Expand Down
2 changes: 2 additions & 0 deletions src/CSSList/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public function __construct($lineNumber = 0)

/**
* @throws SourceException
*
* @internal since V8.8.0
*/
public static function parse(ParserState $parserState): Document
{
Expand Down
4 changes: 4 additions & 0 deletions src/Parsing/ParserState.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ public function setPosition($iPosition): void
* @return string
*
* @throws UnexpectedTokenException
*
* @internal since V8.8.0
*/
public function parseIdentifier($bIgnoreCase = true)
{
Expand Down Expand Up @@ -167,6 +169,8 @@ public function parseIdentifier($bIgnoreCase = true)
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*
* @internal since V8.8.0
*/
public function parseCharacter($bIsForIdentifier)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Rule/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public function __construct($sRule, $lineNumber = 0, $iColNo = 0)
/**
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*
* @internal since V8.8.0
*/
public static function parse(ParserState $parserState): Rule
{
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/DeclarationBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public function __construct($lineNumber = 0)
*
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*
* @internal since V8.8.0
*/
public static function parse(ParserState $parserState, $list = null)
{
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/RuleSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public function __construct($lineNumber = 0)
/**
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*
* @internal since V8.8.0
*/
public static function parseRuleSet(ParserState $parserState, RuleSet $ruleSet): void
{
Expand Down
2 changes: 2 additions & 0 deletions src/Value/CSSFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public function __construct($sName, $aArguments, $sSeparator = ',', $lineNumber
* @throws SourceException
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*
* @internal since V8.8.0
*/
public static function parse(ParserState $parserState, bool $bIgnoreCase = false): CSSFunction
{
Expand Down
2 changes: 2 additions & 0 deletions src/Value/CSSString.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public function __construct($sString, $lineNumber = 0)
* @throws SourceException
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*
* @internal since V8.8.0
*/
public static function parse(ParserState $parserState): CSSString
{
Expand Down
2 changes: 2 additions & 0 deletions src/Value/CalcFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class CalcFunction extends CSSFunction
/**
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*
* @internal since V8.8.0
*/
public static function parse(ParserState $parserState, bool $bIgnoreCase = false): CSSFunction
{
Expand Down
2 changes: 2 additions & 0 deletions src/Value/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public function __construct(array $colorValues, $lineNumber = 0)
/**
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*
* @internal since V8.8.0
*/
public static function parse(ParserState $parserState, bool $ignoreCase = false): CSSFunction
{
Expand Down
2 changes: 2 additions & 0 deletions src/Value/LineName.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public function __construct(array $aComponents = [], $lineNumber = 0)
/**
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*
* @internal since V8.8.0
*/
public static function parse(ParserState $parserState): LineName
{
Expand Down
2 changes: 2 additions & 0 deletions src/Value/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public function __construct($fSize, $sUnit = null, $bIsColorComponent = false, $
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*
* @internal since V8.8.0
*/
public static function parse(ParserState $parserState, $bIsColorComponent = false): Size
{
Expand Down
2 changes: 2 additions & 0 deletions src/Value/URL.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public function __construct(CSSString $oURL, $lineNumber = 0)
* @throws SourceException
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*
* @internal since V8.8.0
*/
public static function parse(ParserState $parserState): URL
{
Expand Down
6 changes: 6 additions & 0 deletions src/Value/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public function __construct($lineNumber = 0)
*
* @throws UnexpectedTokenException
* @throws UnexpectedEOFException
*
* @internal since V8.8.0
*/
public static function parseValue(ParserState $parserState, array $aListDelimiters = [])
{
Expand Down Expand Up @@ -114,6 +116,8 @@ public static function parseValue(ParserState $parserState, array $aListDelimite
*
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
*
* @internal since V8.8.0
*/
public static function parseIdentifierOrFunction(ParserState $parserState, $bIgnoreCase = false)
{
Expand Down Expand Up @@ -144,6 +148,8 @@ public static function parseIdentifierOrFunction(ParserState $parserState, $bIgn
* @throws UnexpectedEOFException
* @throws UnexpectedTokenException
* @throws SourceException
*
* @internal since V8.8.0
*/
public static function parsePrimitiveValue(ParserState $parserState)
{
Expand Down