File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,20 @@ public function isReadonly(): bool {
8080 return (bool ) ($ this ->flags & Modifiers::READONLY );
8181 }
8282
83+ /**
84+ * Whether the property is abstract.
85+ */
86+ public function isAbstract (): bool {
87+ return (bool ) ($ this ->flags & Modifiers::ABSTRACT );
88+ }
89+
90+ /**
91+ * Whether the property is final.
92+ */
93+ public function isFinal (): bool {
94+ return (bool ) ($ this ->flags & Modifiers::FINAL );
95+ }
96+
8397 /**
8498 * Whether the property has explicit public(set) visibility.
8599 */
Original file line number Diff line number Diff line change @@ -57,4 +57,14 @@ public function testSetVisibility() {
5757 $ node = new Property (Modifiers::PUBLIC_SET , []);
5858 $ this ->assertTrue ($ node ->isPublicSet ());
5959 }
60+
61+ public function testIsFinal () {
62+ $ node = new Property (Modifiers::FINAL , []);
63+ $ this ->assertTrue ($ node ->isFinal ());
64+ }
65+
66+ public function testIsAbstract () {
67+ $ node = new Property (Modifiers::ABSTRACT , []);
68+ $ this ->assertTrue ($ node ->isAbstract ());
69+ }
6070}
You can’t perform that action at this time.
0 commit comments