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 PHPStan #53

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Add PHPStan #53

wants to merge 5 commits into from

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Aug 8, 2023

No description provided.

@jtojnar jtojnar mentioned this pull request Nov 20, 2023
@mibe
Copy link
Owner

mibe commented Nov 29, 2023

Is this PR still a draft?

This will allow using PHPStan to detect bugs in both FeedWriter and projects using it.
Additionally, it will provide better information for IDEs.
Do not special case storage of unique elements, just overwrite them at insertion if present.
This will make it easier for both PHPStan and programmer to reason about.
This is static analysis tool.
It can be executed using `composer phpstan`.
@jtojnar
Copy link
Contributor Author

jtojnar commented Dec 4, 2023

There are still 18 errors. Some of them are actually false positives, mainly stemming from overuse of arrays, other are strict_types violation or treatPhpDocTypesAsCertain issues.

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.

2 participants