55use PHPStan \Rules \Rule ;
66use PHPStan \Testing \RuleTestCase ;
77use function defined ;
8- use const PHP_VERSION_ID ;
98
109/**
1110 * @extends RuleTestCase<FetchingDeprecatedConstRule>
@@ -28,33 +27,30 @@ public function testFetchingDeprecatedConst(): void
2827 }
2928
3029 $ expectedErrors = [];
31- 32- if (PHP_VERSION_ID >= 70300 ) {
33- $ expectedErrors [] = [
34- 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated. ' ,
35- 5 ,
36- ];
37- $ expectedErrors [] = [
38- 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated. ' ,
39- 6 ,
40- ];
41- $ expectedErrors [] = [
42- 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated. ' ,
43- 7 ,
44- ];
45- $ expectedErrors [] = [
46- 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated. ' ,
47- 8 ,
48- ];
49- $ expectedErrors [] = [
50- 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated. ' ,
51- 37 ,
52- ];
53- $ expectedErrors [] = [
54- 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated. ' ,
55- 38 ,
56- ];
57- }
30+ $ expectedErrors [] = [
31+ 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated. ' ,
32+ 5 ,
33+ ];
34+ $ expectedErrors [] = [
35+ 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated. ' ,
36+ 6 ,
37+ ];
38+ $ expectedErrors [] = [
39+ 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated. ' ,
40+ 7 ,
41+ ];
42+ $ expectedErrors [] = [
43+ 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated. ' ,
44+ 8 ,
45+ ];
46+ $ expectedErrors [] = [
47+ 'Use of constant FILTER_FLAG_SCHEME_REQUIRED is deprecated. ' ,
48+ 37 ,
49+ ];
50+ $ expectedErrors [] = [
51+ 'Use of constant FILTER_FLAG_HOST_REQUIRED is deprecated. ' ,
52+ 38 ,
53+ ];
5854
5955 require_once __DIR__ . '/data/fetching-deprecated-const-definition.php ' ;
6056 $ this ->analyse (
0 commit comments