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:
84
84
count : 1
85
85
path : ../tests/ParserTest.php
86
86
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
-
93
87
-
94
88
message : ' #^Parameter \#1 \$value of method Sabberworm\\CSS\\Rule\\Rule\:\:setValue\(\) expects Sabberworm\\CSS\\Value\\RuleValueList\|string\|null, Sabberworm\\CSS\\Value\\Size given\.$#'
95
89
identifier : argument.type
Original file line number Diff line number Diff line change 8
8
use Sabberworm \CSS \Property \Selector \SpecificityCalculator ;
9
9
use Sabberworm \CSS \Renderable ;
10
10
11
+ use function Safe \preg_match ;
12
+
11
13
/**
12
14
* Class representing a single CSS selector. Selectors have to be split by the comma prior to being passed into this
13
15
* class.
@@ -57,7 +59,7 @@ class Selector implements Renderable
57
59
public static function isValid (string $ selector ): bool
58
60
{
59
61
// 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 );
61
63
62
64
return $ numberOfMatches === 1 ;
63
65
}
Original file line number Diff line number Diff line change @@ -73,11 +73,7 @@ public function files(): void
73
73
continue ;
74
74
}
75
75
$ 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 ());
81
77
}
82
78
\closedir ($ directoryHandle );
83
79
}
You can’t perform that action at this time.
0 commit comments