File tree 1 file changed +8
-2
lines changed
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
1283
1283
1284
1284
public function hasFinalByKeywordOverride (): bool
1285
1285
{
1286
- return $ this ->isClass () && $ this -> finalByKeywordOverride !== null ;
1286
+ return $ this ->finalByKeywordOverride !== null ;
1287
1287
}
1288
1288
1289
1289
public function isFinalByKeyword (): bool
@@ -1292,7 +1292,7 @@ public function isFinalByKeyword(): bool
1292
1292
return true ;
1293
1293
}
1294
1294
1295
- if ($ this ->isClass () && $ this -> finalByKeywordOverride !== null ) {
1295
+ if ($ this ->finalByKeywordOverride !== null ) {
1296
1296
return $ this ->finalByKeywordOverride ;
1297
1297
}
1298
1298
@@ -1600,6 +1600,12 @@ public function asFinal(): self
1600
1600
if ($ this ->finalByKeywordOverride === true ) {
1601
1601
return $ this ;
1602
1602
}
1603
+ if (!$ this ->isClass ()) {
1604
+ return $ this ;
1605
+ }
1606
+ if ($ this ->isAbstract ()) {
1607
+ return $ this ;
1608
+ }
1603
1609
1604
1610
return new self (
1605
1611
$ this ->reflectionProvider ,
You can’t perform that action at this time.
0 commit comments