A catch block is empty and says nothing about why

tx0/php:empty-catchrecommendedwarningreliability/error-handlingdepth fastsmell

What it finds

catch (Exception $e) {}: an empty catch swallows the error, and the program goes on in a state nobody checked. A comment in the block that says why the error does not matter is enough to leave it alone.

From the rule's source, empty_catch.rs.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/php:empty-catch" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/php:empty-catch] reason="..."

tx0 explain tx0/php:empty-catch shows the same in the terminal. Found a false positive? Report it.