forked from doctrine/coding-standard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp80-compatibility.patch
138 lines (127 loc) · 5.01 KB
/
php80-compatibility.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
diff --git a/tests/expected_report.txt b/tests/expected_report.txt
index 9b19b9e..760ee4a 100644
--- a/tests/expected_report.txt
+++ b/tests/expected_report.txt
@@ -13,13 +13,12 @@ tests/input/class-references.php 10 2
tests/input/ClassPropertySpacing.php 2 0
tests/input/concatenation_spacing.php 49 0
tests/input/constants-no-lsb.php 2 0
-tests/input/constants-var.php 13 0
+tests/input/constants-var.php 7 0
tests/input/ControlStructures.php 28 0
tests/input/doc-comment-spacing.php 11 0
tests/input/duplicate-assignment-variable.php 1 0
tests/input/EarlyReturn.php 7 0
-tests/input/example-class.php 48 0
-tests/input/ExampleBackedEnum.php 5 0
+tests/input/example-class.php 47 0
tests/input/Exceptions.php 1 0
tests/input/forbidden-comments.php 14 0
tests/input/forbidden-functions.php 6 0
@@ -34,7 +33,7 @@ tests/input/null_coalesce_equal_operator.php 5 0
tests/input/null_coalesce_operator.php 3 0
tests/input/null_safe_operator.php 1 0
tests/input/optimized-functions.php 1 0
-tests/input/PropertyDeclaration.php 16 0
+tests/input/PropertyDeclaration.php 11 0
tests/input/return_type_on_closures.php 26 0
tests/input/return_type_on_methods.php 22 0
tests/input/semicolon_spacing.php 3 0
@@ -54,9 +53,9 @@ tests/input/use-ordering.php 1 0
tests/input/useless-semicolon.php 2 0
tests/input/UselessConditions.php 21 0
----------------------------------------------------------------------
-A TOTAL OF 476 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
+A TOTAL OF 459 ERRORS AND 2 WARNINGS WERE FOUND IN 49 FILES
----------------------------------------------------------------------
-PHPCBF CAN FIX 391 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
+PHPCBF CAN FIX 375 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
diff --git a/tests/fixed/ExampleBackedEnum.php b/tests/fixed/ExampleBackedEnum.php
index fd701eb..fe54eb9 100644
--- a/tests/fixed/ExampleBackedEnum.php
+++ b/tests/fixed/ExampleBackedEnum.php
@@ -3,14 +3,3 @@
declare(strict_types=1);
namespace ExampleBackedEnum;
-
-enum ExampleBackedEnum: int
-{
- case FOO = 0;
- case BAR = 1;
-
- case BAZ = 2;
-
- /** Brevis, primus coordinataes foris promissio de varius, barbatus heuretes. */
- case BAM = 1234;
-}
diff --git a/tests/fixed/PropertyDeclaration.php b/tests/fixed/PropertyDeclaration.php
index 9703897..7821d5c 100644
--- a/tests/fixed/PropertyDeclaration.php
+++ b/tests/fixed/PropertyDeclaration.php
@@ -12,7 +12,7 @@ final class PropertyDeclaration
public string|null $nullableString = null;
public function __construct(
- public readonly Foo $foo,
+ public Foo $foo,
) {
}
}
diff --git a/tests/fixed/constants-var.php b/tests/fixed/constants-var.php
index f10c235..d4268cb 100644
--- a/tests/fixed/constants-var.php
+++ b/tests/fixed/constants-var.php
@@ -13,19 +13,19 @@ const BAR_1 = 2;
class Bar
{
- public const int BAZ = 456;
+ public const BAZ = 456;
- protected const string PROPERTY_1 = '1';
- protected const string PROPERTY_2 = '2';
+ protected const PROPERTY_1 = '1';
+ protected const PROPERTY_2 = '2';
}
class Spacing
{
- public const string FOO = 'bar';
- public const string BAR = 'bar';
+ public const FOO = 'bar';
+ public const BAR = 'bar';
- public const string BAZ = 'baz';
+ public const BAZ = 'baz';
/** Brevis, primus coordinataes foris promissio de varius, barbatus heuretes. */
- private const int BAM = 1234;
+ private const BAM = 1234;
}
diff --git a/tests/input/ExampleBackedEnum.php b/tests/input/ExampleBackedEnum.php
index 3b09f47..fe54eb9 100644
--- a/tests/input/ExampleBackedEnum.php
+++ b/tests/input/ExampleBackedEnum.php
@@ -3,16 +3,3 @@
declare(strict_types=1);
namespace ExampleBackedEnum;
-
-enum ExampleBackedEnum : int
-{
- case FOO = 0;
- case BAR = 1;
-
-
- case BAZ = 2;
-
-
- /** Brevis, primus coordinataes foris promissio de varius, barbatus heuretes. */
- case BAM = 1234;
-}
diff --git a/tests/input/PropertyDeclaration.php b/tests/input/PropertyDeclaration.php
index acdc445..4eb8164 100644
--- a/tests/input/PropertyDeclaration.php
+++ b/tests/input/PropertyDeclaration.php
@@ -12,7 +12,7 @@ final class PropertyDeclaration
public ? string $nullableString = null;
public function __construct(
- public readonly Foo $foo,
+ public Foo $foo
) {
}
}