File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed 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.
@@ -42,7 +44,7 @@ class Selector implements Renderable
4244 public static function isValid (string $ selector ): bool
4345 {
4446 // Note: We need to use `static::` here as the constant is overridden in the `KeyframeSelector` class.
45- $ numberOfMatches = \ preg_match (static ::SELECTOR_VALIDATION_RX , $ selector );
47+ $ numberOfMatches = preg_match (static ::SELECTOR_VALIDATION_RX , $ selector );
4648
4749 return $ numberOfMatches === 1 ;
4850 }
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