File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 22
33namespace PHPStan \Reflection \Php ;
44
5- use PhpParser \Modifiers ;
65use PhpParser \Node ;
76use PhpParser \Node \Stmt \ClassMethod ;
87use PHPStan \Reflection \Assertions ;
@@ -230,20 +229,15 @@ public function isFinal(): TrinaryLogic
230229 {
231230 $ method = $ this ->getClassMethod ();
232231 if ($ method instanceof Node \PropertyHook) {
233- return TrinaryLogic::createFromBoolean (( bool ) ( $ method ->flags & Modifiers:: FINAL ));
232+ return TrinaryLogic::createFromBoolean ($ method ->isFinal ( ));
234233 }
235234
236235 return TrinaryLogic::createFromBoolean ($ method ->isFinal () || $ this ->isFinal );
237236 }
238237
239238 public function isFinalByKeyword (): TrinaryLogic
240239 {
241- $ method = $ this ->getClassMethod ();
242- if ($ method instanceof Node \PropertyHook) {
243- return TrinaryLogic::createFromBoolean ((bool ) ($ method ->flags & Modifiers::FINAL ));
244- }
245-
246- return TrinaryLogic::createFromBoolean ($ method ->isFinal ());
240+ return TrinaryLogic::createFromBoolean ($ this ->getClassMethod ()->isFinal ());
247241 }
248242
249243 public function isBuiltin (): bool
You can’t perform that action at this time.
0 commit comments