File tree 1 file changed +24
-28
lines changed
1 file changed +24
-28
lines changed Original file line number Diff line number Diff line change 5
5
use PHPStan \Rules \Rule ;
6
6
use PHPStan \Testing \RuleTestCase ;
7
7
use function defined ;
8
- use const PHP_VERSION_ID ;
9
8
10
9
/**
11
10
* @extends RuleTestCase<FetchingDeprecatedConstRule>
@@ -28,33 +27,30 @@ public function testFetchingDeprecatedConst(): void
28
27
}
29
28
30
29
$ 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
+ ];
58
54
59
55
require_once __DIR__ . '/data/fetching-deprecated-const-definition.php ' ;
60
56
$ this ->analyse (
You can’t perform that action at this time.
0 commit comments