Skip to content

Commit 3dcdca4

Browse files
committed
[BUGFIX] Fix a type annotation in RuleSet
1 parent 54ca442 commit 3dcdca4

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
@@ -330,12 +330,6 @@ parameters:
330330
count: 1
331331
path: ../src/RuleSet/DeclarationBlock.php
332332

333-
-
334-
message: '#^Argument of an invalid type Sabberworm\\CSS\\Rule\\Rule supplied for foreach, only iterables are supported\.$#'
335-
identifier: foreach.nonIterable
336-
count: 2
337-
path: ../src/RuleSet/RuleSet.php
338-
339333
-
340334
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:removeLastSemicolon\(\)\.$#'
341335
identifier: method.notFound
@@ -396,12 +390,6 @@ parameters:
396390
count: 1
397391
path: ../src/RuleSet/RuleSet.php
398392

399-
-
400-
message: '#^Use explicit methods over array access on object$#'
401-
identifier: typePerfect.noArrayAccessOnObject
402-
count: 1
403-
path: ../src/RuleSet/RuleSet.php
404-
405393
-
406394
message: '#^Parameters should have "string" types as the only types passed to this method$#'
407395
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 or rule name as the key,
29+
* with potentially multiple rules per property or rule name.
30+
*
31+
* @var array<string, array<int<0,max>, Rule>>
2932
*/
3033
private $rules = [];
3134

0 commit comments

Comments
 (0)