Skip to content
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

[TASK] Add visibility to all class/interface constants #470

Merged
merged 1 commit into from
Feb 13, 2024
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).

### Changed

- Add visibility to all class/interface constants (#469)

### Deprecated

### Removed
Expand Down
2 changes: 1 addition & 1 deletion src/Parsing/ParserState.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ParserState
/**
* @var null
*/
const EOF = null;
public const EOF = null;

/**
* @var Settings
Expand Down
4 changes: 2 additions & 2 deletions src/Property/AtRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ interface AtRule extends Renderable, Commentable
*
* @var string
*/
const BLOCK_RULES = 'media/document/supports/region-style/font-feature-values';
public const BLOCK_RULES = 'media/document/supports/region-style/font-feature-values';

/**
* … and more font-specific ones (to be used inside font-feature-values)
*
* @var string
*/
const SET_RULES = 'font-face/counter-style/page/swash/styleset/annotation';
public const SET_RULES = 'font-face/counter-style/page/swash/styleset/annotation';

/**
* @return string|null
Expand Down
2 changes: 1 addition & 1 deletion src/Property/KeyframeSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class KeyframeSelector extends Selector
*
* @var string
*/
const SELECTOR_VALIDATION_RX = '/
public const SELECTOR_VALIDATION_RX = '/
^(
(?:
[a-zA-Z0-9\x{00A0}-\x{FFFF}_^$|*="\'~\[\]()\-\s\.:#+>]* # any sequence of valid unescaped characters
Expand Down
6 changes: 3 additions & 3 deletions src/Property/Selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Selector
*
* @var string
*/
const NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX = '/
private const NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX = '/
(\.[\w]+) # classes
|
\[(\w+) # attributes
Expand All @@ -37,7 +37,7 @@ class Selector
*
* @var string
*/
const ELEMENTS_AND_PSEUDO_ELEMENTS_RX = '/
private const ELEMENTS_AND_PSEUDO_ELEMENTS_RX = '/
((^|[\s\+\>\~]+)[\w]+ # elements
|
\:{1,2}( # pseudo-elements
Expand All @@ -50,7 +50,7 @@ class Selector
*
* @var string
*/
const SELECTOR_VALIDATION_RX = '/
public const SELECTOR_VALIDATION_RX = '/
^(
(?:
[a-zA-Z0-9\x{00A0}-\x{FFFF}_^$|*="\'~\[\]()\-\s\.:#+>]* # any sequence of valid unescaped characters
Expand Down
4 changes: 2 additions & 2 deletions src/Value/CalcFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class CalcFunction extends CSSFunction
/**
* @var int
*/
const T_OPERAND = 1;
private const T_OPERAND = 1;

/**
* @var int
*/
const T_OPERATOR = 2;
private const T_OPERATOR = 2;

/**
* @param ParserState $oParserState
Expand Down
6 changes: 3 additions & 3 deletions src/Value/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ class Size extends PrimitiveValue
*
* @var array<int, string>
*/
const ABSOLUTE_SIZE_UNITS = ['px', 'cm', 'mm', 'mozmm', 'in', 'pt', 'pc', 'vh', 'vw', 'vmin', 'vmax', 'rem'];
private const ABSOLUTE_SIZE_UNITS = ['px', 'cm', 'mm', 'mozmm', 'in', 'pt', 'pc', 'vh', 'vw', 'vmin', 'vmax', 'rem'];

/**
* @var array<int, string>
*/
const RELATIVE_SIZE_UNITS = ['%', 'em', 'ex', 'ch', 'fr'];
private const RELATIVE_SIZE_UNITS = ['%', 'em', 'ex', 'ch', 'fr'];

/**
* @var array<int, string>
*/
const NON_SIZE_UNITS = ['deg', 'grad', 'rad', 's', 'ms', 'turn', 'Hz', 'kHz'];
private const NON_SIZE_UNITS = ['deg', 'grad', 'rad', 's', 'ms', 'turn', 'Hz', 'kHz'];

/**
* @var array<int, array<string, string>>|null
Expand Down
2 changes: 1 addition & 1 deletion tests/OutputFormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class OutputFormatTest extends TestCase
/**
* @var string
*/
const TEST_CSS = <<<EOT
private const TEST_CSS = <<<EOT

.main, .test {
font: italic normal bold 16px/1.2 "Helvetica", Verdana, sans-serif;
Expand Down