File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1283,7 +1283,7 @@ public function acceptsNamedArguments(): bool
12831283
12841284 public function hasFinalByKeywordOverride (): bool
12851285 {
1286- return $ this ->isClass () && $ this -> finalByKeywordOverride !== null ;
1286+ return $ this ->finalByKeywordOverride !== null ;
12871287 }
12881288
12891289 public function isFinalByKeyword (): bool
@@ -1292,7 +1292,7 @@ public function isFinalByKeyword(): bool
12921292 return true ;
12931293 }
12941294
1295- if ($ this ->isClass () && $ this -> finalByKeywordOverride !== null ) {
1295+ if ($ this ->finalByKeywordOverride !== null ) {
12961296 return $ this ->finalByKeywordOverride ;
12971297 }
12981298
@@ -1600,6 +1600,12 @@ public function asFinal(): self
16001600 if ($ this ->finalByKeywordOverride === true ) {
16011601 return $ this ;
16021602 }
1603+ if (!$ this ->isClass ()) {
1604+ return $ this ;
1605+ }
1606+ if ($ this ->isAbstract ()) {
1607+ return $ this ;
1608+ }
16031609
16041610 return new self (
16051611 $ this ->reflectionProvider ,
You can’t perform that action at this time.
0 commit comments