Skip to content

Commit abcbb30

Browse files
authored
[BUGFIX] Fix a type annotation in RuleSet (#1051)
1 parent 335a890 commit abcbb30

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

config/phpstan-baseline.neon

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,6 @@ parameters:
318318
count: 1
319319
path: ../src/RuleSet/DeclarationBlock.php
320320

321-
-
322-
message: '#^Argument of an invalid type Sabberworm\\CSS\\Rule\\Rule supplied for foreach, only iterables are supported\.$#'
323-
identifier: foreach.nonIterable
324-
count: 2
325-
path: ../src/RuleSet/RuleSet.php
326-
327321
-
328322
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:removeLastSemicolon\(\)\.$#'
329323
identifier: method.notFound
@@ -384,12 +378,6 @@ parameters:
384378
count: 1
385379
path: ../src/RuleSet/RuleSet.php
386380

387-
-
388-
message: '#^Use explicit methods over array access on object$#'
389-
identifier: typePerfect.noArrayAccessOnObject
390-
count: 1
391-
path: ../src/RuleSet/RuleSet.php
392-
393381
-
394382
message: '#^Parameters should have "string" types as the only types passed to this method$#'
395383
identifier: typePerfect.narrowPublicClassMethodParamType

src/RuleSet/RuleSet.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
abstract class RuleSet implements Renderable, Commentable
2626
{
2727
/**
28-
* @var array<string, Rule>
28+
* the rules in this rule set, using the property name as the key,
29+
* with potentially multiple rules per property name.
30+
*
31+
* @var array<string, array<int<0, max>, Rule>>
2932
*/
3033
private $rules = [];
3134

0 commit comments

Comments
 (0)