Skip to content

Commit 9db4bc2

Browse files
authored
Merge pull request #1595 from WordPress-Coding-Standards/feature/update-since-docs
Documentation: Touch up the class and method documentation
2 parents bcc3b85 + 816322c commit 9db4bc2

29 files changed

+54
-50
lines changed

WordPress/AbstractArrayAssignmentRestrictionsSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
* @since 0.3.0
2020
* @since 0.10.0 Class became a proper abstract class. This was already the behaviour.
2121
* Moved the file and renamed the class from
22-
* `WordPress_Sniffs_Arrays_ArrayAssignmentRestrictionsSniff` to
23-
* `WordPress_AbstractArrayAssignmentRestrictionsSniff`.
22+
* `\WordPressCS\WordPress\Sniffs\Arrays\ArrayAssignmentRestrictionsSniff` to
23+
* `\WordPressCS\WordPress\AbstractArrayAssignmentRestrictionsSniff`.
2424
*/
2525
abstract class AbstractArrayAssignmentRestrictionsSniff extends Sniff {
2626

WordPress/AbstractClassRestrictionsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function register() {
7979
/**
8080
* Processes this test, when one of its tokens is encountered.
8181
*
82-
* {@internal Unlike in the `WordPress_AbstractFunctionRestrictionsSniff`,
82+
* {@internal Unlike in the `AbstractFunctionRestrictionsSniff`,
8383
* we can't do a preliminary check on classes as at this point
8484
* we don't know the class name yet.}}
8585
*

WordPress/AbstractFunctionRestrictionsSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
* @since 0.3.0
2121
* @since 0.10.0 Class became a proper abstract class. This was already the behaviour.
2222
* Moved the file and renamed the class from
23-
* `WordPress_Sniffs_Functions_FunctionRestrictionsSniff` to
24-
* `WordPress_AbstractFunctionRestrictionsSniff`.
25-
* @since 0.11.0 Extends the WordPress_Sniff class.
23+
* `\WordPressCS\WordPress\Sniffs\Functions\FunctionRestrictionsSniff` to
24+
* `\WordPressCS\WordPress\AbstractFunctionRestrictionsSniff`.
25+
* @since 0.11.0 Extends the WordPressCS native `Sniff` class.
2626
*/
2727
abstract class AbstractFunctionRestrictionsSniff extends Sniff {
2828

WordPress/Sniff.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ abstract class Sniff implements PHPCS_Sniff {
500500
* @since 0.3.0
501501
* @since 0.11.0 Changed visibility from public to protected.
502502
* @since 0.12.0 Renamed from `$globals` to `$wp_globals` to be more descriptive.
503-
* @since 0.12.0 Moved from WordPress_Sniffs_Variables_GlobalVariablesSniff to WordPress_Sniff
503+
* @since 0.12.0 Moved here from the WordPress.Variables.GlobalVariables sniff.
504504
*
505505
* @var array
506506
*/
@@ -955,7 +955,7 @@ protected function string_to_errorcode( $base_string ) {
955955
* before merging/returning to allow for resetting to the base array.
956956
*
957957
* {@internal Function is static as it doesn't use any of the properties or others
958-
* methods anyway and this way the `WordPress_Sniffs_NamingConventions_ValidVariableNameSniff`
958+
* methods anyway and this way the `WordPress.NamingConventions.ValidVariableName` sniff
959959
* which extends an upstream sniff can also use it.}}
960960
*
961961
* @since 0.11.0
@@ -2196,7 +2196,7 @@ protected function find_array_open_close( $stackPtr ) {
21962196
* Determine the namespace name an arbitrary token lives in.
21972197
*
21982198
* @since 0.10.0
2199-
* @since 0.12.0 Moved from the WordPress_AbstractClassRestrictionsSniff to this sniff.
2199+
* @since 0.12.0 Moved from the `AbstractClassRestrictionsSniff` to this class.
22002200
*
22012201
* @param int $stackPtr The token position for which to determine the namespace.
22022202
*
@@ -2262,7 +2262,7 @@ public function determine_namespace( $stackPtr ) {
22622262
* i.e. MyProject\Sub\Level which will be returned together as one string.
22632263
*
22642264
* @since 0.12.0 A lesser variant of this method previously existed in the
2265-
* WordPress_AbstractClassRestrictionsSniff.
2265+
* `AbstractClassRestrictionsSniff` class.
22662266
*
22672267
* @param int|bool $stackPtr The position of a T_NAMESPACE token.
22682268
*

WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@
2727
* @package WPCS\WordPressCodingStandards
2828
*
2929
* @since 0.11.0 - The WordPress specific additional checks have now been split off
30-
* from the WordPress_Sniffs_Arrays_ArrayDeclaration sniff into
31-
* this sniff.
30+
* from the `WordPress.Arrays.ArrayDeclaration` sniff into this sniff.
3231
* - Added sniffing & fixing for associative arrays.
3332
* @since 0.12.0 Decoupled this sniff from the upstream sniff completely.
34-
* This sniff now extends the `WordPress_Sniff` instead.
35-
* @since 0.13.0 Added the last remaining checks from the `ArrayDeclaration` sniff
36-
* which were not covered elsewhere. The `ArrayDeclaration` sniff has
37-
* now been deprecated.
33+
* This sniff now extends the WordPressCS native `Sniff` class instead.
34+
* @since 0.13.0 Added the last remaining checks from the `WordPress.Arrays.ArrayDeclaration`
35+
* sniff which were not covered elsewhere.
36+
* The `WordPress.Arrays.ArrayDeclaration` sniff has now been deprecated.
3837
* @since 0.13.0 Class name changed: this class is now namespaced.
3938
* @since 0.14.0 Single item associative arrays are now by default exempt from the
4039
* "must be multi-line" rule. This behaviour can be changed using the

WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @since 0.3.0
2222
* @since 0.7.0 This sniff now has the ability to fix a number of the issues it flags.
23-
* @since 0.12.0 This class now extends WordPress_Sniff.
23+
* @since 0.12.0 This class now extends the WordPressCS native `Sniff` class.
2424
* @since 0.13.0 Class name changed: this class is now namespaced.
2525
*/
2626
class ArrayKeySpacingRestrictionsSniff extends Sniff {

WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @since 0.3.0
2323
* @since 0.6.0 Removed the add_unique_message() function as it is no longer needed.
24-
* @since 0.11.0 This class now extends WordPress_Sniff.
24+
* @since 0.11.0 This class now extends the WordPressCS native `Sniff` class.
2525
* @since 0.13.0 Class name changed: this class is now namespaced.
2626
* @since 1.0.0 This sniff has been moved from the `VIP` category to the `DB` category.
2727
*/

WordPress/Sniffs/Files/FileNameSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
* template tags end in `-template`. Based on @subpackage file DocBlock tag.
2626
* - This sniff will now allow for underscores in file names for certain theme
2727
* specific exceptions if the `$is_theme` property is set to `true`.
28-
* @since 0.12.0 Now extends the `WordPress_Sniff` class.
28+
* @since 0.12.0 Now extends the WordPressCS native `Sniff` class.
2929
* @since 0.13.0 Class name changed: this class is now namespaced.
3030
*
31-
* @uses \WordPress\Sniff::$custom_test_class_whitelist
31+
* @uses \WordPressCS\WordPress\Sniff::$custom_test_class_whitelist
3232
*/
3333
class FileNameSniff extends Sniff {
3434

WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @since 0.13.0 Class name changed: this class is now namespaced.
2323
* @since 1.2.0 Now also checks whether namespaces are prefixed.
2424
*
25-
* @uses \WordPress\Sniff::$custom_test_class_whitelist
25+
* @uses \WordPressCS\WordPress\Sniff::$custom_test_class_whitelist
2626
*/
2727
class PrefixAllGlobalsSniff extends AbstractFunctionParameterSniff {
2828

WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* @package WPCS\WordPressCodingStandards
2525
*
2626
* @since 0.10.0
27-
* @since 0.11.0 Extends the WordPress_AbstractFunctionParameterSniff class.
27+
* @since 0.11.0 Extends the WordPressCS native `AbstractFunctionParameterSniff` class.
2828
* @since 0.13.0 Class name changed: this class is now namespaced.
2929
*/
3030
class ValidHookNameSniff extends AbstractFunctionParameterSniff {

0 commit comments

Comments
 (0)