Skip to content

Commit 7e80f08

Browse files
authored
[TASK] Add native type declarations for DeclarationBlock (#1193)
Part of #811
1 parent 8f82bf3 commit 7e80f08

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Please also have a look at our
3535
(#641, #772, #774, #778, #804, #841, #873, #875, #891, #922, #923, #933, #958,
3636
#964, #967, #1000, #1044, #1134, #1136, #1137, #1139, #1140, #1141, #1145,
3737
#1162, #1163, #1166, #1172, #1174, #1178, #1179, #1181, #1183, #1184, #1186,
38-
#1187, #1190, #1192)
38+
#1187, #1190, #1192, #1193)
3939
- Add visibility to all class/interface constants (#469)
4040

4141
### Deprecated

src/RuleSet/DeclarationBlock.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,14 @@ class DeclarationBlock extends RuleSet
3030
private $selectors = [];
3131

3232
/**
33-
* @param CSSList|null $list
34-
*
3533
* @return DeclarationBlock|false
3634
*
3735
* @throws UnexpectedTokenException
3836
* @throws UnexpectedEOFException
3937
*
4038
* @internal since V8.8.0
4139
*/
42-
public static function parse(ParserState $parserState, $list = null)
40+
public static function parse(ParserState $parserState, ?CSSList $list = null)
4341
{
4442
$comments = [];
4543
$result = new DeclarationBlock($parserState->currentLine());
@@ -77,11 +75,10 @@ public static function parse(ParserState $parserState, $list = null)
7775

7876
/**
7977
* @param array<Selector|string>|string $selectors
80-
* @param CSSList|null $list
8178
*
8279
* @throws UnexpectedTokenException
8380
*/
84-
public function setSelectors($selectors, $list = null): void
81+
public function setSelectors($selectors, ?CSSList $list = null): void
8582
{
8683
if (\is_array($selectors)) {
8784
$this->selectors = $selectors;

0 commit comments

Comments
 (0)