-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathphp80-compatibility.patch
83 lines (77 loc) · 3.15 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
diff --git a/tests/expected_report.txt b/tests/expected_report.txt
index d1e1fad..71022c4 100644
--- a/tests/expected_report.txt
+++ b/tests/expected_report.txt
@@ -19,7 +19,6 @@
tests/input/duplicate-assignment-variable.php 1 0
tests/input/EarlyReturn.php 7 0
tests/input/example-class.php 47 0
-tests/input/ExampleBackedEnum.php 3 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_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/useless-semicolon.php 2 0
tests/input/UselessConditions.php 21 0
----------------------------------------------------------------------
-A TOTAL OF 466 ERRORS AND 2 WARNINGS WERE FOUND IN 50 FILES
+A TOTAL OF 458 ERRORS AND 2 WARNINGS WERE FOUND IN 49 FILES
----------------------------------------------------------------------
-PHPCBF CAN FIX 382 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
+PHPCBF CAN FIX 374 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
diff --git a/tests/fixed/ExampleBackedEnum.php b/tests/fixed/ExampleBackedEnum.php
index cc38c54..fe54eb9 100644
--- a/tests/fixed/ExampleBackedEnum.php
+++ b/tests/fixed/ExampleBackedEnum.php
@@ -3,7 +3,3 @@
declare(strict_types=1);
namespace ExampleBackedEnum;
-
-enum ExampleBackedEnum: int
-{
-}
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/input/ExampleBackedEnum.php b/tests/input/ExampleBackedEnum.php
index 0c47286..fe54eb9 100644
--- a/tests/input/ExampleBackedEnum.php
+++ b/tests/input/ExampleBackedEnum.php
@@ -3,7 +3,3 @@
declare(strict_types=1);
namespace ExampleBackedEnum;
-
-enum ExampleBackedEnum : int
-{
-}
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
) {
}
}