Skip to content

Commit b7f8553

Browse files
committed
[TASK] Make constructors of CSS element classes @internal
These classes are intended to be instantiated only from within this library. Fixes #858
1 parent f7914f8 commit b7f8553

26 files changed

+51
-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+
- Make constructors of CSS element classes `@internal` (#888)
2425
- Make all non-private properties `@internal` (#886)
2526
- Use more native type declarations and strict mode
2627
(#641, #772, #774, #778, #804, #841, #873, #875)

src/CSSList/AtRuleBlockList.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class AtRuleBlockList extends CSSBlockList implements AtRule
2626
* @param string $type
2727
* @param string $arguments
2828
* @param int $lineNumber
29+
*
30+
* @internal since 8.8.0
2931
*/
3032
public function __construct($type, $arguments = '', $lineNumber = 0)
3133
{

src/CSSList/CSSBlockList.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ abstract class CSSBlockList extends CSSList
2222
{
2323
/**
2424
* @param int $lineNumber
25+
*
26+
* @internal since 8.8.0
2527
*/
2628
public function __construct($lineNumber = 0)
2729
{

src/CSSList/CSSList.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ abstract class CSSList implements Renderable, Commentable
5656

5757
/**
5858
* @param int $lineNumber
59+
*
60+
* @internal since 8.8.0
5961
*/
6062
public function __construct($lineNumber = 0)
6163
{

src/CSSList/Document.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class Document extends CSSBlockList
2020
{
2121
/**
2222
* @param int $lineNumber
23+
*
24+
* @internal since 8.8.0
2325
*/
2426
public function __construct($lineNumber = 0)
2527
{

src/Comment/Comment.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class Comment implements Renderable
2626
/**
2727
* @param string $commentText
2828
* @param int $lineNumber
29+
*
30+
* @internal since 8.8.0
2931
*/
3032
public function __construct($commentText = '', $lineNumber = 0)
3133
{

src/Parsing/Anchor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class Anchor
2121

2222
/**
2323
* @param int $iPosition
24+
*
25+
* @internal since 8.8.0
2426
*/
2527
public function __construct($iPosition, ParserState $parserState)
2628
{

src/Property/CSSNamespace.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class CSSNamespace implements AtRule
3838
* @param string $mUrl
3939
* @param string|null $sPrefix
4040
* @param int $lineNumber
41+
*
42+
* @internal since 8.8.0
4143
*/
4244
public function __construct($mUrl, $sPrefix = null, $lineNumber = 0)
4345
{

src/Property/Charset.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class Charset implements AtRule
3939

4040
/**
4141
* @param int $lineNumber
42+
*
43+
* @internal since 8.8.0
4244
*/
4345
public function __construct(CSSString $oCharset, $lineNumber = 0)
4446
{

src/Property/Import.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class Import implements AtRule
4040
/**
4141
* @param string $mediaQuery
4242
* @param int $lineNumber
43+
*
44+
* @internal since 8.8.0
4345
*/
4446
public function __construct(URL $location, $mediaQuery, $lineNumber = 0)
4547
{

0 commit comments

Comments
 (0)