@@ -20,13 +20,16 @@ class ExportedPropertyNode implements JsonSerializable, ExportedNode
20
20
21
21
private bool $ static ;
22
22
23
+ private bool $ readonly ;
24
+
23
25
public function __construct (
24
26
string $ name ,
25
27
?ExportedPhpDocNode $ phpDoc ,
26
28
?string $ type ,
27
29
bool $ public ,
28
30
bool $ private ,
29
- bool $ static
31
+ bool $ static ,
32
+ bool $ readonly
30
33
)
31
34
{
32
35
$ this ->name = $ name ;
@@ -35,6 +38,7 @@ public function __construct(
35
38
$ this ->public = $ public ;
36
39
$ this ->private = $ private ;
37
40
$ this ->static = $ static ;
41
+ $ this ->readonly = $ readonly ;
38
42
}
39
43
40
44
public function equals (ExportedNode $ node ): bool
@@ -59,7 +63,8 @@ public function equals(ExportedNode $node): bool
59
63
&& $ this ->type === $ node ->type
60
64
&& $ this ->public === $ node ->public
61
65
&& $ this ->private === $ node ->private
62
- && $ this ->static === $ node ->static ;
66
+ && $ this ->static === $ node ->static
67
+ && $ this ->readonly === $ node ->readonly ;
63
68
}
64
69
65
70
/**
@@ -74,7 +79,8 @@ public static function __set_state(array $properties): ExportedNode
74
79
$ properties ['type ' ],
75
80
$ properties ['public ' ],
76
81
$ properties ['private ' ],
77
- $ properties ['static ' ]
82
+ $ properties ['static ' ],
83
+ $ properties ['readonly ' ]
78
84
);
79
85
}
80
86
@@ -90,7 +96,8 @@ public static function decode(array $data): ExportedNode
90
96
$ data ['type ' ],
91
97
$ data ['public ' ],
92
98
$ data ['private ' ],
93
- $ data ['static ' ]
99
+ $ data ['static ' ],
100
+ $ data ['readonly ' ]
94
101
);
95
102
}
96
103
@@ -108,6 +115,7 @@ public function jsonSerialize()
108
115
'public ' => $ this ->public ,
109
116
'private ' => $ this ->private ,
110
117
'static ' => $ this ->static ,
118
+ 'readonly ' => $ this ->readonly ,
111
119
],
112
120
];
113
121
}
0 commit comments