@@ -20,13 +20,16 @@ class ExportedPropertyNode implements JsonSerializable, ExportedNode
2020
2121 private bool $ static ;
2222
23+ private bool $ readonly ;
24+
2325 public function __construct (
2426 string $ name ,
2527 ?ExportedPhpDocNode $ phpDoc ,
2628 ?string $ type ,
2729 bool $ public ,
2830 bool $ private ,
29- bool $ static
31+ bool $ static ,
32+ bool $ readonly
3033 )
3134 {
3235 $ this ->name = $ name ;
@@ -35,6 +38,7 @@ public function __construct(
3538 $ this ->public = $ public ;
3639 $ this ->private = $ private ;
3740 $ this ->static = $ static ;
41+ $ this ->readonly = $ readonly ;
3842 }
3943
4044 public function equals (ExportedNode $ node ): bool
@@ -59,7 +63,8 @@ public function equals(ExportedNode $node): bool
5963 && $ this ->type === $ node ->type
6064 && $ this ->public === $ node ->public
6165 && $ this ->private === $ node ->private
62- && $ this ->static === $ node ->static ;
66+ && $ this ->static === $ node ->static
67+ && $ this ->readonly === $ node ->readonly ;
6368 }
6469
6570 /**
@@ -74,7 +79,8 @@ public static function __set_state(array $properties): ExportedNode
7479 $ properties ['type ' ],
7580 $ properties ['public ' ],
7681 $ properties ['private ' ],
77- $ properties ['static ' ]
82+ $ properties ['static ' ],
83+ $ properties ['readonly ' ]
7884 );
7985 }
8086
@@ -90,7 +96,8 @@ public static function decode(array $data): ExportedNode
9096 $ data ['type ' ],
9197 $ data ['public ' ],
9298 $ data ['private ' ],
93- $ data ['static ' ]
99+ $ data ['static ' ],
100+ $ data ['readonly ' ]
94101 );
95102 }
96103
@@ -108,6 +115,7 @@ public function jsonSerialize()
108115 'public ' => $ this ->public ,
109116 'private ' => $ this ->private ,
110117 'static ' => $ this ->static ,
118+ 'readonly ' => $ this ->readonly ,
111119 ],
112120 ];
113121 }
0 commit comments