-
Notifications
You must be signed in to change notification settings - Fork 344
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
Fix return types #1362
Fix return types #1362
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1362 +/- ##
============================================
+ Coverage 97.30% 97.31% +0.01%
Complexity 2806 2806
============================================
Files 174 174
Lines 7975 7975
============================================
+ Hits 7760 7761 +1
+ Misses 215 214 -1
Continue to review full report at Codecov.
|
phpstan fails in CI, but I don't get this fail locally. CI has phpstan (0.12.99) and I have the same version locally. Edit: the difference is that locally I am running PHP 7.4 and It should be fine to run the code analysis with PHP 7.4 |
@@ -735,9 +735,7 @@ public function outboxRequest(IOutbox $outboxNode, RequestInterface $request, Re | |||
|
|||
/** | |||
* This method is responsible for parsing a free-busy query request and | |||
* returning it's result. | |||
* | |||
* @return string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function has no return statements at all. Why is the PHPdoc saying that it should return a string?
@@ -140,6 +140,8 @@ public function getCalendarObjects($calendarId) | |||
], | |||
]; | |||
} | |||
|
|||
return []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From here, the changes are test code.
We can put this sort of return
at the end of a function to keep phpstan happy. It will never be executed, but that is no problem.
a8ea6b8
to
cea1483
Compare
Fixes #1361
I have tried to minimize changes to real code, and o mostly just delete or adjust PHPdoc to match reality. That gets CI green with the minimum impact.