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 2
2
3
3
namespace PHPStan \Reflection \Php ;
4
4
5
- use PhpParser \Modifiers ;
6
5
use PhpParser \Node ;
7
6
use PhpParser \Node \Stmt \ClassMethod ;
8
7
use PHPStan \Reflection \Assertions ;
@@ -230,20 +229,15 @@ public function isFinal(): TrinaryLogic
230
229
{
231
230
$ method = $ this ->getClassMethod ();
232
231
if ($ method instanceof Node \PropertyHook) {
233
- return TrinaryLogic::createFromBoolean (( bool ) ( $ method ->flags & Modifiers:: FINAL ));
232
+ return TrinaryLogic::createFromBoolean ($ method ->isFinal ( ));
234
233
}
235
234
236
235
return TrinaryLogic::createFromBoolean ($ method ->isFinal () || $ this ->isFinal );
237
236
}
238
237
239
238
public function isFinalByKeyword (): TrinaryLogic
240
239
{
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 ());
247
241
}
248
242
249
243
public function isBuiltin (): bool
You can’t perform that action at this time.
0 commit comments