Skip to content

Commit

Permalink
[#1945] BadExceptionsProcessingInspector: updated a message.
Browse files Browse the repository at this point in the history
  • Loading branch information
ea-inspections-team committed Sep 26, 2024
1 parent a74fa98 commit 71d4b61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/

public class BadExceptionsProcessingInspector extends BasePhpInspection {
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.";
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).";
private static final String messageFailSilently = "The exception being ignored, please don't fail silently and at least log it.";
private static final String messageChainedException = "The exception being ignored, please log it or use chained exceptions.";

Expand Down
2 changes: 1 addition & 1 deletion testData/fixtures/codeStyle/bad-exceptions-handling.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
throw new RuntimeException('...');
}

<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> {
<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> {
echo 1;
echo 2;
echo 3;
Expand Down

0 comments on commit 71d4b61

Please sign in to comment.