From 866b18a1ecec344d940f58cfa935c7acbea9f233 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Sun, 1 Oct 2023 09:59:59 +0100 Subject: [PATCH] docs: adds `@pest-ignore-type` --- type-coverage.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/type-coverage.md b/type-coverage.md index 0209dd0..e6c0b5a 100644 --- a/type-coverage.md +++ b/type-coverage.md @@ -29,6 +29,17 @@ If any of your files are missing type declarations, they will be highlighted in As example, `rt31` means that the return type of the function on line 31 is missing. On the other hand, `pa31` means that the parameter type of the function on line 31 is missing. +## Ignoring Errors + +Sometimes, you may want to ignore a specific error or line of code. To do so, you may use the `@pest-ignore-type` annotation: + +```php + protected $except = [ // @pest-ignore-type + // ... + ]; +} +``` + ## Minimum Threshold Enforcement Just like code coverage, type coverage can also be enforced. To ensure any code that is added to your application is fully typed, you can use the `--type-coverage` and `--min` options to define the minimum threshold values for type coverage results. If the specified thresholds are not met, Pest will report a failure.