Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note about static analysis #235

Merged
merged 4 commits into from Feb 28, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -249,6 +249,9 @@ Overriding the following methods in your assertion class allows you to change th
* `protected static function reportInvalidArgument($message)`
* This method is called when an assertion fails, with the specified error message. Here you can throw your own exception, or log something.

## Static analysis support

Where applicable assertion functions are annotated to support Psalms' [Assertion syntax](https://psalm.dev/docs/annotating_code/assertion_syntax/). A dedicated [PHPStan Plugin](https://github.com/phpstan/phpstan-webmozart-assert) is required for proper type support.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this. Two things:

  • Write Psalm's
  • Split this line after the word after 80 character length.

Copy link
Contributor Author

@staabm staabm Jan 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, adjusted (not accurately on 80 chars.. hope thats ok) - have no editor at hand atm.


Authors
-------
Expand Down