Skip to content

Commit 12154a6

Browse files
committed
Docs: improve consistency and specificity [1]
This fixes up the `@return` type declarations for all `register()` methods.
1 parent 8db56ec commit 12154a6

28 files changed

+28
-28
lines changed

WordPressVIPMinimum/Sniffs/AbstractVariableRestrictionsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ abstract class AbstractVariableRestrictionsSniff extends Sniff {
5858
/**
5959
* Returns an array of tokens this test wants to listen for.
6060
*
61-
* @return array
61+
* @return array<int|string>
6262
*/
6363
public function register() {
6464
// Retrieve the groups only once and don't set up a listener if there are no groups.

WordPressVIPMinimum/Sniffs/Constants/ConstantStringSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ConstantStringSniff extends Sniff {
2020
/**
2121
* Returns an array of tokens this test wants to listen for.
2222
*
23-
* @return array
23+
* @return array<int|string>
2424
*/
2525
public function register() {
2626
return [

WordPressVIPMinimum/Sniffs/Constants/RestrictedConstantsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class RestrictedConstantsSniff extends Sniff {
3838
/**
3939
* Returns an array of tokens this test wants to listen for.
4040
*
41-
* @return array
41+
* @return array<int|string>
4242
*/
4343
public function register() {
4444
return [

WordPressVIPMinimum/Sniffs/Files/IncludingFileSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function getGroups() {
107107
/**
108108
* Returns an array of tokens this test wants to listen for.
109109
*
110-
* @return array
110+
* @return array<int|string>
111111
*/
112112
public function register() {
113113
return Tokens::$includeTokens;

WordPressVIPMinimum/Sniffs/Files/IncludingNonPHPFileSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class IncludingNonPHPFileSniff extends Sniff {
4444
/**
4545
* Returns an array of tokens this test wants to listen for.
4646
*
47-
* @return array
47+
* @return array<int|string>
4848
*/
4949
public function register() {
5050
return Tokens::$includeTokens;

WordPressVIPMinimum/Sniffs/Functions/CheckReturnValueSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class CheckReturnValueSniff extends Sniff {
5757
/**
5858
* Returns the token types that this sniff is interested in.
5959
*
60-
* @return array(int)
60+
* @return array<int|string>
6161
*/
6262
public function register() {
6363
return [ T_STRING ];

WordPressVIPMinimum/Sniffs/Functions/DynamicCallsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class DynamicCallsSniff extends Sniff {
6262
/**
6363
* Returns the token types that this sniff is interested in.
6464
*
65-
* @return array(int)
65+
* @return array<int|string>
6666
*/
6767
public function register() {
6868
return [ T_VARIABLE => T_VARIABLE ];

WordPressVIPMinimum/Sniffs/Hooks/AlwaysReturnInFilterSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class AlwaysReturnInFilterSniff extends Sniff {
2727
/**
2828
* Returns the token types that this sniff is interested in.
2929
*
30-
* @return array(int)
30+
* @return array<int|string>
3131
*/
3232
public function register() {
3333
return [ T_STRING ];

WordPressVIPMinimum/Sniffs/Hooks/PreGetPostsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class PreGetPostsSniff extends Sniff {
2121
/**
2222
* Returns the token types that this sniff is interested in.
2323
*
24-
* @return array(int)
24+
* @return array<int|string>
2525
*/
2626
public function register() {
2727
return [ T_STRING ];

WordPressVIPMinimum/Sniffs/JS/DangerouslySetInnerHTMLSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class DangerouslySetInnerHTMLSniff extends Sniff {
2727
/**
2828
* Returns an array of tokens this test wants to listen for.
2929
*
30-
* @return array
30+
* @return array<int|string>
3131
*/
3232
public function register() {
3333
return [

0 commit comments

Comments
 (0)