-
-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathPropertyDeclarationUnitTest.inc.fixed
More file actions
125 lines (97 loc) · 2.54 KB
/
Copy pathPropertyDeclarationUnitTest.inc.fixed
File metadata and controls
125 lines (97 loc) · 2.54 KB
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
<?php
class MyClass
{
public $var = null;
protected $var = null;
private $var = null;
$var = null;
var $var = null;
static $var = null;
public var $var = null; // Parse error.
public $_var = null;
protected $_var = null;
private $_var = null;
public $foo, $bar, $var = null;
public $foo,
$bar,
$var = null;
protected
$foo,
$bar;
}
class foo
{
const bar = <<<BAZ
qux
BAZ;
}
class ABC {
public static $propA;
protected static $propB;
private static $propC;
public static $propD;
protected static
$propE;
private static /*comment*/ $propF;
}
class MyClass
{
public string $var = null;
protected ?Folder\ClassName $var = null;
var int $var = null;
static int $var = null;
private int $_var = null;
public $foo, $bar, $var = null;
public ?string $foo,
$bar,
$var = null;
protected
array $foo,
$bar;
}
class MyClass
{
public string $var = null;
protected ?Folder\ClassName $var = null;
public int $var = null;
public static int /*comment*/$var = null;
}
class ReadOnlyProp {
public readonly int $foo,
$bar,
$var = null;
protected readonly ?string $foo;
readonly array $foo;
public readonly int $wrongOrder1;
protected readonly ?string $wrongOrder2;
}
class FinalProperties {
final public int $foo,
$bar,
$var = null;
final protected (D|N)|false $foo;
final array $foo;
FINAL public ?int $wrongOrder1;
final protected static ?string $wrongOrder2;
}
class AsymmetricVisibility {
private(set) int $foo,
$bar,
$var = 5;
public private(set) readonly ?string $spaces;
protected(set) array $unfixed;
public protected(set) int $wrongOrder1;
protected private(set) ?string $wrongOrder2;
final protected private(set) static bool $correctOrder;
final protected private(set) static bool $wrongOrder3;
final protected private(set) static bool $wrongOrder4;
final public protected(set) static bool $wrongOrder5;
final public public(set) static bool $wrongOrder6;
final protected private(set) static bool $wrongOrder7;
final protected private(set) static bool $wrongOrder8;
final public protected(set) static bool $wrongOrder9;
final public public(set) static bool $wrongOrder10;
final private(set) static bool $wrongOrder11;
final protected(set) static bool $wrongOrder12;
final public(set) static bool $wrongOrder13;
}