Skip to content

Commit 71d4b61

Browse files
[#1945] BadExceptionsProcessingInspector: updated a message.
1 parent a74fa98 commit 71d4b61

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/kalessil/phpStorm/phpInspectionsEA/inspectors/codeStyle/BadExceptionsProcessingInspector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525

2626
public class BadExceptionsProcessingInspector extends BasePhpInspection {
27-
private static final String messagePattern = "Consider moving non-related statements (%c% in total) outside the try-block or refactoring the try-body into a function/method.";
27+
private static final String messagePattern = "It is possible that some of the statements contained in the try block can be extracted into their own methods or functions (we recommend that you do not include more than three statements per try block).";
2828
private static final String messageFailSilently = "The exception being ignored, please don't fail silently and at least log it.";
2929
private static final String messageChainedException = "The exception being ignored, please log it or use chained exceptions.";
3030

testData/fixtures/codeStyle/bad-exceptions-handling.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
throw new RuntimeException('...');
1111
}
1212

13-
<weak_warning descr="[EA] Consider moving non-related statements (4 in total) outside the try-block or refactoring the try-body into a function/method.">try</weak_warning> {
13+
<weak_warning descr="[EA] It is possible that some of the statements contained in the try block can be extracted into their own methods or functions (we recommend that you do not include more than three statements per try block).">try</weak_warning> {
1414
echo 1;
1515
echo 2;
1616
echo 3;

0 commit comments

Comments
 (0)