File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -134,15 +134,9 @@ class Ruleset
134
134
*/
135
135
public function __construct (Config $ config )
136
136
{
137
- // Ignore sniff restrictions if caching is on.
138
- $ restrictions = [];
139
- $ exclusions = [];
140
- if ($ config ->cache === false ) {
141
- $ restrictions = $ config ->sniffs ;
142
- $ exclusions = $ config ->exclude ;
143
- }
144
-
145
137
$ this ->config = $ config ;
138
+ $ restrictions = $ config ->sniffs ;
139
+ $ exclusions = $ config ->exclude ;
146
140
$ sniffs = [];
147
141
148
142
$ standardPaths = [];
@@ -208,6 +202,12 @@ public function __construct(Config $config)
208
202
$ sniffs = array_merge ($ sniffs , $ this ->processRuleset ($ standard ));
209
203
}//end foreach
210
204
205
+ // Ignore sniff restrictions if caching is on.
206
+ if ($ config ->cache === true ) {
207
+ $ restrictions = [];
208
+ $ exclusions = [];
209
+ }
210
+
211
211
$ sniffRestrictions = [];
212
212
foreach ($ restrictions as $ sniffCode ) {
213
213
$ parts = explode ('. ' , strtolower ($ sniffCode ));
You can’t perform that action at this time.
0 commit comments