File tree Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,6 @@ parameters:
8484 count : 1
8585 path : ../tests/ParserTest.php
8686
87- -
88- message : ' #^Parameter \#1 \$message of static method PHPUnit\\Framework\\Assert\:\:fail\(\) expects string, Exception given\.$#'
89- identifier : argument.type
90- count : 1
91- path : ../tests/ParserTest.php
92-
9387 -
9488 message : ' #^Parameter \#1 \$value of method Sabberworm\\CSS\\Rule\\Rule\:\:setValue\(\) expects Sabberworm\\CSS\\Value\\RuleValueList\|string\|null, Sabberworm\\CSS\\Value\\Size given\.$#'
9589 identifier : argument.type
Original file line number Diff line number Diff line change 88use Sabberworm \CSS \Property \Selector \SpecificityCalculator ;
99use Sabberworm \CSS \Renderable ;
1010
11+ use function Safe \preg_match ;
12+
1113/**
1214 * Class representing a single CSS selector. Selectors have to be split by the comma prior to being passed into this
1315 * class.
@@ -57,7 +59,7 @@ class Selector implements Renderable
5759 public static function isValid (string $ selector ): bool
5860 {
5961 // Note: We need to use `static::` here as the constant is overridden in the `KeyframeSelector` class.
60- $ numberOfMatches = \ preg_match (static ::SELECTOR_VALIDATION_RX , $ selector );
62+ $ numberOfMatches = preg_match (static ::SELECTOR_VALIDATION_RX , $ selector );
6163
6264 return $ numberOfMatches === 1 ;
6365 }
Original file line number Diff line number Diff line change @@ -73,11 +73,7 @@ public function files(): void
7373 continue ;
7474 }
7575 $ parser = new Parser (\file_get_contents ($ directory . '/ ' . $ filename ));
76- try {
77- self ::assertNotEquals ('' , $ parser ->parse ()->render ());
78- } catch (\Exception $ e ) {
79- self ::fail ($ e );
80- }
76+ self ::assertNotSame ('' , $ parser ->parse ()->render ());
8177 }
8278 \closedir ($ directoryHandle );
8379 }
You can’t perform that action at this time.
0 commit comments