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

Adding support for phpstan #5

Merged
merged 5 commits into from
Jan 8, 2024
Merged

Adding support for phpstan #5

merged 5 commits into from
Jan 8, 2024

Conversation

pnx
Copy link
Contributor

@pnx pnx commented Jan 2, 2024

Nice to have phpstan in this project to catch additional problems :)

@olssonm
Copy link
Owner

olssonm commented Jan 3, 2024

@pnx Thanks! Haven't worked much with PHPStan to be honest, will look through it all as soon as I've got the time!

@verifiera
Copy link

PHPDoc does not follow convention:
https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/property.html

There is a $ sign in front of variable names in @Property tag (all tags actually). PHPStorm allows variables without $, but this is not correct.

@verifiera
Copy link

PHPDoc does not follow convention: https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/property.html

There is a $ sign in front of variable names in @Property tag (all tags actually). PHPStorm allows variables without $, but this is not correct.

For example in Refund.php

@olssonm
Copy link
Owner

olssonm commented Jan 8, 2024

@verifiera – not sure what you mean? This PR by @pnx's adds $ for @property?

@verifiera
Copy link

verifiera commented Jan 8, 2024

@verifiera – not sure what you mean? This PR by @pnx's adds $ for @property?

PR does it also. Just wanted to say that to make it easy to use your great library in a project with PHPStan static analysis probably is enough to update @phpdocs for Olssonm\Swish\Refund (other classes looks correctly). Currently, there is a problem, we use your library in the project with phpstan integrated, and need handle the Refund class in a special way because $ signs are missing in @PHPDoc section.

@olssonm olssonm merged commit d4861ab into olssonm:main Jan 8, 2024
8 checks passed
@olssonm
Copy link
Owner

olssonm commented Jan 8, 2024

@pnx Thanks for your PR! A new release has been published (v2.1) and it should be available shortly via packagist.org.

@verifiera
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants