Skip to content

Commit 537f5e8

Browse files
authored
[TASK] Mark many parsing-related methods as @internal (#908)
The only parsing method that is expected to be called from outside of this library is `Parser::parse()`.
1 parent 62a2e65 commit 537f5e8

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
{

0 commit comments

Comments
 (0)