Skip to content

Commit 7d7b5da

Browse files
committed
[TASK] Mark many parsing-related methods as @internal
The only parsing method that is expected to be called from outside of this library is `Parser::parse()`.
1 parent a5d22be commit 7d7b5da

File tree

15 files changed

+35
-0
lines changed

15 files changed

+35
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Please also have a look at our
2121

2222
### Changed
2323

24+
- Mark parsing-related methods of most CSS elements as `@internal` (#907)
2425
- Mark `OutputFormat::nextLevel()` as `@internal` (#901)
2526
- Only allow `string` for some `OutputFormat` properties (#885)
2627
- Make all non-private properties `@internal` (#886)

src/CSSList/CSSList.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public function __construct($lineNumber = 0)
6767
/**
6868
* @throws UnexpectedTokenException
6969
* @throws SourceException
70+
*
71+
* @internal since V8.8.0
7072
*/
7173
public static function parseList(ParserState $parserState, CSSList $list): void
7274
{

src/CSSList/Document.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public function __construct($lineNumber = 0)
2828

2929
/**
3030
* @throws SourceException
31+
*
32+
* @internal since V8.8.0
3133
*/
3234
public static function parse(ParserState $parserState): Document
3335
{

src/Parsing/ParserState.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ public function setPosition($iPosition): void
136136
* @return string
137137
*
138138
* @throws UnexpectedTokenException
139+
*
140+
* @internal since V8.8.0
139141
*/
140142
public function parseIdentifier($bIgnoreCase = true)
141143
{
@@ -167,6 +169,8 @@ public function parseIdentifier($bIgnoreCase = true)
167169
*
168170
* @throws UnexpectedEOFException
169171
* @throws UnexpectedTokenException
172+
*
173+
* @internal since V8.8.0
170174
*/
171175
public function parseCharacter($bIsForIdentifier)
172176
{

src/Rule/Rule.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ public function __construct($sRule, $lineNumber = 0, $iColNo = 0)
7979
/**
8080
* @throws UnexpectedEOFException
8181
* @throws UnexpectedTokenException
82+
*
83+
* @internal since V8.8.0
8284
*/
8385
public static function parse(ParserState $parserState): Rule
8486
{

src/RuleSet/DeclarationBlock.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public function __construct($lineNumber = 0)
4545
*
4646
* @throws UnexpectedTokenException
4747
* @throws UnexpectedEOFException
48+
*
49+
* @internal since V8.8.0
4850
*/
4951
public static function parse(ParserState $parserState, $list = null)
5052
{

src/RuleSet/RuleSet.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public function __construct($lineNumber = 0)
5656
/**
5757
* @throws UnexpectedTokenException
5858
* @throws UnexpectedEOFException
59+
*
60+
* @internal since V8.8.0
5961
*/
6062
public static function parseRuleSet(ParserState $parserState, RuleSet $ruleSet): void
6163
{

src/Value/CSSFunction.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public function __construct($sName, $aArguments, $sSeparator = ',', $lineNumber
4444
* @throws SourceException
4545
* @throws UnexpectedEOFException
4646
* @throws UnexpectedTokenException
47+
*
48+
* @internal since V8.8.0
4749
*/
4850
public static function parse(ParserState $parserState, bool $bIgnoreCase = false): CSSFunction
4951
{

src/Value/CSSString.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public function __construct($sString, $lineNumber = 0)
3636
* @throws SourceException
3737
* @throws UnexpectedEOFException
3838
* @throws UnexpectedTokenException
39+
*
40+
* @internal since V8.8.0
3941
*/
4042
public static function parse(ParserState $parserState): CSSString
4143
{

src/Value/CalcFunction.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class CalcFunction extends CSSFunction
2323
/**
2424
* @throws UnexpectedTokenException
2525
* @throws UnexpectedEOFException
26+
*
27+
* @internal since V8.8.0
2628
*/
2729
public static function parse(ParserState $parserState, bool $bIgnoreCase = false): CSSFunction
2830
{

src/Value/Color.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public function __construct(array $colorValues, $lineNumber = 0)
2727
/**
2828
* @throws UnexpectedEOFException
2929
* @throws UnexpectedTokenException
30+
*
31+
* @internal since V8.8.0
3032
*/
3133
public static function parse(ParserState $parserState, bool $ignoreCase = false): CSSFunction
3234
{

src/Value/LineName.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public function __construct(array $aComponents = [], $lineNumber = 0)
2323
/**
2424
* @throws UnexpectedTokenException
2525
* @throws UnexpectedEOFException
26+
*
27+
* @internal since V8.8.0
2628
*/
2729
public static function parse(ParserState $parserState): LineName
2830
{

src/Value/Size.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ public function __construct($fSize, $sUnit = null, $bIsColorComponent = false, $
8686
*
8787
* @throws UnexpectedEOFException
8888
* @throws UnexpectedTokenException
89+
*
90+
* @internal since V8.8.0
8991
*/
9092
public static function parse(ParserState $parserState, $bIsColorComponent = false): Size
9193
{

src/Value/URL.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public function __construct(CSSString $oURL, $lineNumber = 0)
3333
* @throws SourceException
3434
* @throws UnexpectedEOFException
3535
* @throws UnexpectedTokenException
36+
*
37+
* @internal since V8.8.0
3638
*/
3739
public static function parse(ParserState $parserState): URL
3840
{

src/Value/Value.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public function __construct($lineNumber = 0)
3838
*
3939
* @throws UnexpectedTokenException
4040
* @throws UnexpectedEOFException
41+
*
42+
* @internal since V8.8.0
4143
*/
4244
public static function parseValue(ParserState $parserState, array $aListDelimiters = [])
4345
{
@@ -114,6 +116,8 @@ public static function parseValue(ParserState $parserState, array $aListDelimite
114116
*
115117
* @throws UnexpectedEOFException
116118
* @throws UnexpectedTokenException
119+
*
120+
* @internal since V8.8.0
117121
*/
118122
public static function parseIdentifierOrFunction(ParserState $parserState, $bIgnoreCase = false)
119123
{
@@ -144,6 +148,8 @@ public static function parseIdentifierOrFunction(ParserState $parserState, $bIgn
144148
* @throws UnexpectedEOFException
145149
* @throws UnexpectedTokenException
146150
* @throws SourceException
151+
*
152+
* @internal since V8.8.0
147153
*/
148154
public static function parsePrimitiveValue(ParserState $parserState)
149155
{

0 commit comments

Comments
 (0)