Skip to content

Commit 769e1df

Browse files
authored
[TASK] Mark many parsing-related methods as @internal (#913)
The only parsing method that is expected to be called from outside of this library is `Parser::parse()`. This is the V8.x backport of #908.
1 parent c2254ef commit 769e1df

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
@@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1111

1212
### Changed
1313

14+
- Mark parsing-related methods of most CSS elements as `@internal` (#90)
1415
- Mark `OutputFormat::nextLevel()` as `@internal` (#901)
1516
- Make all non-private properties `@internal` (#886)
1617

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($iLineNo = 0)
6767
*
6868
* @throws UnexpectedTokenException
6969
* @throws SourceException
70+
*
71+
* @internal since V8.8.0
7072
*/
7173
public static function parseList(ParserState $oParserState, CSSList $oList)
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($iLineNo = 0)
2828
* @return Document
2929
*
3030
* @throws SourceException
31+
*
32+
* @internal since V8.8.0
3133
*/
3234
public static function parse(ParserState $oParserState)
3335
{

src/Parsing/ParserState.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ public function setPosition($iPosition)
141141
* @return string
142142
*
143143
* @throws UnexpectedTokenException
144+
*
145+
* @internal since V8.8.0
144146
*/
145147
public function parseIdentifier($bIgnoreCase = true)
146148
{
@@ -172,6 +174,8 @@ public function parseIdentifier($bIgnoreCase = true)
172174
*
173175
* @throws UnexpectedEOFException
174176
* @throws UnexpectedTokenException
177+
*
178+
* @internal since V8.8.0
175179
*/
176180
public function parseCharacter($bIsForIdentifier)
177181
{

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, $iLineNo = 0, $iColNo = 0)
7979
*
8080
* @throws UnexpectedEOFException
8181
* @throws UnexpectedTokenException
82+
*
83+
* @internal since V8.8.0
8284
*/
8385
public static function parse(ParserState $oParserState)
8486
{

src/RuleSet/DeclarationBlock.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public function __construct($iLineNo = 0)
4949
*
5050
* @throws UnexpectedTokenException
5151
* @throws UnexpectedEOFException
52+
*
53+
* @internal since V8.8.0
5254
*/
5355
public static function parse(ParserState $oParserState, $oList = null)
5456
{

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($iLineNo = 0)
5656
*
5757
* @throws UnexpectedTokenException
5858
* @throws UnexpectedEOFException
59+
*
60+
* @internal since V8.8.0
5961
*/
6062
public static function parseRuleSet(ParserState $oParserState, RuleSet $oRuleSet)
6163
{

src/Value/CSSFunction.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ public function __construct($sName, $aArguments, $sSeparator = ',', $iLineNo = 0
4747
* @throws SourceException
4848
* @throws UnexpectedEOFException
4949
* @throws UnexpectedTokenException
50+
*
51+
* @internal since V8.8.0
5052
*/
5153
public static function parse(ParserState $oParserState, $bIgnoreCase = false)
5254
{

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, $iLineNo = 0)
3636
* @throws SourceException
3737
* @throws UnexpectedEOFException
3838
* @throws UnexpectedTokenException
39+
*
40+
* @internal since V8.8.0
3941
*/
4042
public static function parse(ParserState $oParserState)
4143
{

src/Value/CalcFunction.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class CalcFunction extends CSSFunction
3030
*
3131
* @throws UnexpectedTokenException
3232
* @throws UnexpectedEOFException
33+
*
34+
* @internal since V8.8.0
3335
*/
3436
public static function parse(ParserState $oParserState, $bIgnoreCase = false)
3537
{

src/Value/Color.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public function __construct(array $aColor, $iLineNo = 0)
3030
*
3131
* @throws UnexpectedEOFException
3232
* @throws UnexpectedTokenException
33+
*
34+
* @internal since V8.8.0
3335
*/
3436
public static function parse(ParserState $oParserState, $bIgnoreCase = false)
3537
{

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 = [], $iLineNo = 0)
2323
*
2424
* @throws UnexpectedTokenException
2525
* @throws UnexpectedEOFException
26+
*
27+
* @internal since V8.8.0
2628
*/
2729
public static function parse(ParserState $oParserState)
2830
{

src/Value/Size.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ public function __construct($fSize, $sUnit = null, $bIsColorComponent = false, $
9292
*
9393
* @throws UnexpectedEOFException
9494
* @throws UnexpectedTokenException
95+
*
96+
* @internal since V8.8.0
9597
*/
9698
public static function parse(ParserState $oParserState, $bIsColorComponent = false)
9799
{

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, $iLineNo = 0)
3333
* @throws SourceException
3434
* @throws UnexpectedEOFException
3535
* @throws UnexpectedTokenException
36+
*
37+
* @internal since V8.8.0
3638
*/
3739
public static function parse(ParserState $oParserState)
3840
{

src/Value/Value.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public function __construct($iLineNo = 0)
3636
*
3737
* @throws UnexpectedTokenException
3838
* @throws UnexpectedEOFException
39+
*
40+
* @internal since V8.8.0
3941
*/
4042
public static function parseValue(ParserState $oParserState, array $aListDelimiters = [])
4143
{
@@ -112,6 +114,8 @@ public static function parseValue(ParserState $oParserState, array $aListDelimit
112114
*
113115
* @throws UnexpectedEOFException
114116
* @throws UnexpectedTokenException
117+
*
118+
* @internal since V8.8.0
115119
*/
116120
public static function parseIdentifierOrFunction(ParserState $oParserState, $bIgnoreCase = false)
117121
{
@@ -142,6 +146,8 @@ public static function parseIdentifierOrFunction(ParserState $oParserState, $bIg
142146
* @throws UnexpectedEOFException
143147
* @throws UnexpectedTokenException
144148
* @throws SourceException
149+
*
150+
* @internal since V8.8.0
145151
*/
146152
public static function parsePrimitiveValue(ParserState $oParserState)
147153
{

0 commit comments

Comments
 (0)