-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Intentions and Solutions #77
Comments
Totally agree! I‘ve meant to write a blog post a while ago, but never got around to actually do it. I’ll take care of it! 👍 |
Still haven't gotten around to writing the post, but haven't forgotten - have recently moved, got lots of things to do. Hope to get it done soon! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Since this issue has not had any activity within the last sixty days, I have marked it as stale. |
Since this issue has not had any activity within the last sixty days, I have marked it as stale. I will close it if no further activity occurs within the next five days. |
Since this issue has not had any activity within the last sixty days, I have marked it as stale. I will close it if no further activity occurs within the next five days. |
I totally @dmecke, for now i am not going to use this rules anymore, they causing confusion. Thanks for the effort on these rules. but for now i remove them from the programming. |
Well, for this specific rule the answer, I guess, is that nullable return types mean, that there are in fact two possible "types" that might be returned: the actual type or null. So every callee has to make sure to check for null, which makes the code much harder to read. If can rely on one specific type instead, you don't have to make any checks. You could achieve this with the null object pattern for example. And you might ask yourself: what does null actually mean? Maybe it's some kind of error case, so maybe an exception could be the better way to handle it. Anyhow, these are just my thoughts and I am sure there is more reasoning about that topic. |
Since this issue has not had any activity within the last 180 days, I have marked it as stale. I will close it if no further activity occurs within the next 14 days. |
Since this issue has not had any activity within the last 180 days, I have marked it as stale. I will close it if no further activity occurs within the next 14 days. |
First of all thank you for sharing your phpstan rules!
There are some rules (the nullable-rules to be precise) where I get the intention, but I am not sure how to avoid violations in some cases. I think there might also be a lack of understandment why some rules might be a good idea.
I think the rules would benefit from a brief description on why they should be applied and how to avoid violations.
The text was updated successfully, but these errors were encountered: