1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
psalm/docs/running_psalm
AndrolGenhald d09e420939 Add @psalm-check-type and @psalm-check-type-exact.
I initially added these as part of my TryAnalyzer rewrite to allow testing complicated `finally` types like this:
```
$foo = 1;
try {
        $foo = 2;
} catch (Exception $_) {
        $foo = 3;
} finally {
        $bar = $foo;
        /** @psalm-check-type-exact $bar = 1|2|3 */;
}
/** @psalm-check-type-exact $bar = 2|3 */;
```
Using the `'assertions'` in tests doesn't work since the type is different inside the `finally`.

I decided to extract the new annotation from the rest of my changes and do a separate pull request since I think others may find it useful, and it should be much easier to review than the entire TryAnalyzer rewrite.
2022-02-17 10:37:13 -06:00
..
issues Add @psalm-check-type and @psalm-check-type-exact. 2022-02-17 10:37:13 -06:00
plugins
checking_non_php_files.md
command_line_usage.md
configuration.md remove totallyTyped 2022-02-12 10:19:14 +01:00
dealing_with_code_issues.md
error_levels.md remove totallyTyped 2022-02-12 10:19:14 +01:00
installation.md
issues.md Add @psalm-check-type and @psalm-check-type-exact. 2022-02-17 10:37:13 -06:00
language_server.md Fix bullet indentation in documentation. 2022-02-02 14:48:24 -06:00