Suppressions
Inline, by comment:
// worker-safety-ignore WS001private static array $cache = [];
private static array $accepted = []; // worker-safety-ignore WS001,WS008Available forms — the rule list is optional, and omitting it suppresses every rule:
| Directive | Scope |
|---|---|
worker-safety-ignore WS001 |
The comment’s own line and the following line. |
worker-safety-ignore-line WS001 |
The comment’s own line only. |
worker-safety-ignore-next-line WS001 |
The following line only. |
worker-safety-ignore-file WS001 |
The whole file. |
Directives are read from the token stream, so the marker inside a string literal is never mistaken for one.
By attribute, which covers the annotated declaration’s whole line range:
use WorkerSafety\Attribute\WorkerSafetyIgnore;
#[WorkerSafetyIgnore('WS001', 'WS008')]private static array $cache = [];Or by path, in the configuration file, using the ignore key shown above.
Suppressed findings are counted in the summary, so they never disappear silently.