-
-
Notifications
You must be signed in to change notification settings - Fork 471
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 sniff for 'void' in @return tags #1240
base: develop
Are you sure you want to change the base?
Changes from 6 commits
661df0b
1d12603
91278c1
544d0d5
aad4720
41ce582
1e40e6a
ddc1b0d
f8467b2
1f41eec
8dc03a6
7038b15
3f7caab
2eeaacb
5c0aeed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,8 +86,8 @@ public function register() { | |
* | ||
* @param int $stackPtr The position of the current token in the stack. | ||
* | ||
* @return int|void Integer stack pointer to skip forward or void to continue | ||
* normal file processing. | ||
* @return int Integer stack pointer to skip forward or void to continue | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding is, that when a method could return a something or void, that What's not allowed is the case of simply There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe @DrewAPicture could weigh in on this. |
||
* normal file processing. | ||
*/ | ||
public function process_token( $stackPtr ) { | ||
// Reset the temporary storage before processing the token. | ||
|
@@ -167,8 +167,8 @@ public function is_targetted_token( $stackPtr ) { | |
* | ||
* @param int $stackPtr The position of the current token in the stack. | ||
* | ||
* @return int|void Integer stack pointer to skip forward or void to continue | ||
* normal file processing. | ||
* @return int Integer stack pointer to skip forward or void to continue | ||
* normal file processing. | ||
*/ | ||
public function check_for_matches( $stackPtr ) { | ||
$skip_to = array(); | ||
|
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.
A comment could be added here referencing the handbook rule that this sniff relates to.