Skip to content

Commit

Permalink
docs: adds @pest-ignore-type
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro authored Oct 1, 2023
1 parent 1d01eb4 commit 866b18a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions type-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 866b18a

Please sign in to comment.