-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Various phpdoc fixes #22509
Various phpdoc fixes #22509
Conversation
(Standard links)
|
@@ -378,7 +389,6 @@ public static function fixInputParams(&$input) { | |||
} | |||
} | |||
} | |||
return NULL; |
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.
The return type was not being used anywhere, and the docblock was previously being contradictory. void ultimately felt more appropriate.
@@ -319,7 +320,7 @@ public static function getContactTags($contactID, $count = FALSE) { | |||
|
|||
if ($count) { | |||
$dao->fetch(); | |||
return $dao->cnt; | |||
return (int) $dao->cnt; |
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.
Because cnt is sooo much shorter than count .....
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.
Cuter too
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.
I'm fairly certain that I've seen errors in the past when trying to use count
as a column-alias in DAO queries. Never traced the cause - just made a mental note to go along with cnt
as the typical work-around name.
But... in the current stack, it looks like SELECT ... AS count
works fine. So I'm +1 for the count
...
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.
@totten you do know my comments about always 'reading' variables applies - there is only one way to read cnt outloud
Overview
Lots more phpdoc fixes.
Largely these handle the case where previously the type definition was incorrectly placed at the end of the
@param
line, rather than before the variable name.Before
PHPdoc inaccuracies.
After
PHPdoc (more) accurare.
Comments
This is far from comprehensive - there are still lots of PHPdoc issues left after this set of changes.