1.2.182. Collect Methods Throwing Exceptions¶
This is a list of all the methods and functions that throw exception.
This rule reports explicit throw’s, and doesn’t list exceptions passing through : for example, when the exception is thrown in a sub-call, but not caught yet.
<?php
function foo($a) {
if ($a % 2) {
throw new Exception('This is not an even number');
}
}
?>
1.2.182.1. Specs¶
Short name |
Dump/CollectMethodsThrowingExceptions |
Rulesets |
|
Exakat since |
2.5.3 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Medium |
Available in |