Fix an inaccurate copy-pasted comment and the concat() PHPDoc - #10334
Open
Avicennasis wants to merge 3 commits into
Open
Avicennasis wants to merge 3 commits into
Avicennasis wants to merge 3 commits into
Conversation
Member
|
Will you fix the CI issues? |
The variadic $args can be a single array (see the is_array check below), so typing it as string broke PHPStan's contravariance check against the untyped parent and made the is_array() check look like dead code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small correctness fixes in comments/PHPDoc. Base branch is
master.program/actions/mail/mark.php:119 -
// refresh saved search set after moving some messages->// refresh saved search set after marking some messages as deletedNothing is moved in the mark action; it only sets and clears IMAP flags. The branch this comment sits in is
$flag == 'DELETED' && $skip_deleted, i.e. messages disappearing from the list because they were flagged deleted. The identical line exists verbatim inprogram/actions/mail/move.php:87, where it is accurate, which is where it was copied from.program/lib/Roundcube/db/mysql.php:44 -
@return string ...$args Values to concatenate->@param string ...$args Values to concatenateplus a bare@return string...$argsis the parameter list, not the return value; the method returns theCONCAT(...)string. The new layout matches the@param/ blank /@returnshape already used elsewhere in the same file (e.g.dsn_string()at lines 59-61).Two related occurrences I deliberately did not touch
Say the word and I will fold either in:
program/actions/mail/delete.php:71carries the same copy-pasted "after moving" comment.program/lib/Roundcube/rcube_db.php:1088- the abstract parent of the method above - has the same@return string ...$argsmistake.No functional changes: comments and PHPDoc only. No CHANGELOG entry, since neither change is noteworthy for users, admins or plugin authors.