Skip to content

Commit b6a2e0f

Browse files
committed
TooWideMethodThrowTypeRule - new opt-in option for reporting too-wide implicit (inherited) @throws
1 parent 9f415ae commit b6a2e0f

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

conf/bleedingEdge.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ parameters:
1515
reportNestedTooWideType: true
1616
assignToByRefForeachExpr: true
1717
curlSetOptArrayTypes: true
18-
tooWideImplicitThrows: true

conf/config.level4.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ services:
2424
class: PHPStan\Rules\Exceptions\TooWideMethodThrowTypeRule
2525
arguments:
2626
checkProtectedAndPublicMethods: %checkTooWideThrowTypesInProtectedAndPublicMethods%
27-
tooWideImplicitThrows: %featureToggles.tooWideImplicitThrows%
27+
tooWideImplicitThrows: %exceptions.check.tooWideImplicitThrowType%
2828

2929
-
3030
class: PHPStan\Rules\Exceptions\TooWidePropertyHookThrowTypeRule

conf/config.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ parameters:
2222
check:
2323
missingCheckedExceptionInThrows: false
2424
tooWideThrowType: true
25+
tooWideImplicitThrowType: false
2526
throwTypeCovariance: false
2627
featureToggles:
2728
bleedingEdge: false
@@ -40,7 +41,6 @@ parameters:
4041
reportNestedTooWideType: false
4142
assignToByRefForeachExpr: false
4243
curlSetOptArrayTypes: false
43-
tooWideImplicitThrows: false
4444
fileExtensions:
4545
- php
4646
checkAdvancedIsset: false

conf/parametersSchema.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ parametersSchema:
2424
check: structure([
2525
missingCheckedExceptionInThrows: bool(),
2626
tooWideThrowType: bool(),
27-
throwTypeCovariance: bool()
27+
throwTypeCovariance: bool(),
28+
tooWideImplicitThrowType: bool()
2829
])
2930
])
3031
featureToggles: structure([
@@ -43,7 +44,6 @@ parametersSchema:
4344
reportNestedTooWideType: bool()
4445
assignToByRefForeachExpr: bool()
4546
curlSetOptArrayTypes: bool()
46-
tooWideImplicitThrows: bool()
4747
])
4848
fileExtensions: listOf(string())
4949
checkAdvancedIsset: bool()

0 commit comments

Comments
 (0)