Skip to content

Commit 38c950e

Browse files
committed
Docs: remove redundant @package tags
`@package` tags are an arcane manner to group related files as belonging to one project. For projects using namespaces, the current recommendation is to only have `@package` tags when they have supplemental information to the namespace. That is only in a very limited way the case in WPCS, so I'm proposing to remove the `@package` tags from the WPCS class docblocks, though leaving them for now in the file docblocks. At the very least, this removed duplicate information for which there is no reason for the duplication. Includes cleaning up (normalizing) the tag description alignments in the class docblocks. :point_right: reviewing with whitespace changes ignored should make it easier to see that the only real change is the removal of the package tags. Refs: * https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/package.html#package * https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#59-package
1 parent 306542c commit 38c950e

File tree

138 files changed

+426
-681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+426
-681
lines changed

WordPress/AbstractArrayAssignmentRestrictionsSniff.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
2020
/**
2121
* Restricts array assignment of certain keys.
2222
*
23-
* @package WPCS\WordPressCodingStandards
24-
*
25-
* @since 0.3.0
26-
* @since 0.10.0 Class became a proper abstract class. This was already the behaviour.
27-
* Moved the file and renamed the class from
28-
* `\WordPressCS\WordPress\Sniffs\Arrays\ArrayAssignmentRestrictionsSniff` to
29-
* `\WordPressCS\WordPress\AbstractArrayAssignmentRestrictionsSniff`.
23+
* @since 0.3.0
24+
* @since 0.10.0 Class became a proper abstract class. This was already the behaviour.
25+
* Moved the file and renamed the class from
26+
* `\WordPressCS\WordPress\Sniffs\Arrays\ArrayAssignmentRestrictionsSniff` to
27+
* `\WordPressCS\WordPress\AbstractArrayAssignmentRestrictionsSniff`.
3028
*/
3129
abstract class AbstractArrayAssignmentRestrictionsSniff extends Sniff {
3230

WordPress/AbstractClassRestrictionsSniff.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
/**
2020
* Restricts usage of some classes.
2121
*
22-
* @package WPCS\WordPressCodingStandards
23-
*
24-
* @since 0.10.0
22+
* @since 0.10.0
2523
*/
2624
abstract class AbstractClassRestrictionsSniff extends AbstractFunctionRestrictionsSniff {
2725

WordPress/AbstractFunctionParameterSniff.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
/**
1616
* Advises about parameters used in function calls.
1717
*
18-
* @package WPCS\WordPressCodingStandards
19-
*
20-
* @since 0.11.0
18+
* @since 0.11.0
2119
*/
2220
abstract class AbstractFunctionParameterSniff extends AbstractFunctionRestrictionsSniff {
2321

WordPress/AbstractFunctionRestrictionsSniff.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@
1919
/**
2020
* Restricts usage of some functions.
2121
*
22-
* @package WPCS\WordPressCodingStandards
23-
*
24-
* @since 0.3.0
25-
* @since 0.10.0 Class became a proper abstract class. This was already the behaviour.
26-
* Moved the file and renamed the class from
27-
* `\WordPressCS\WordPress\Sniffs\Functions\FunctionRestrictionsSniff` to
28-
* `\WordPressCS\WordPress\AbstractFunctionRestrictionsSniff`.
29-
* @since 0.11.0 Extends the WordPressCS native `Sniff` class.
22+
* @since 0.3.0
23+
* @since 0.10.0 Class became a proper abstract class. This was already the behaviour.
24+
* Moved the file and renamed the class from
25+
* `\WordPressCS\WordPress\Sniffs\Functions\FunctionRestrictionsSniff` to
26+
* `\WordPressCS\WordPress\AbstractFunctionRestrictionsSniff`.
27+
* @since 0.11.0 Extends the WordPressCS native `Sniff` class.
3028
*/
3129
abstract class AbstractFunctionRestrictionsSniff extends Sniff {
3230

WordPress/Helpers/ArrayWalkingFunctionsHelper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
/**
1616
* Helper functions and function lists for checking whether a function applies a callback to an array.
1717
*
18-
* @package WPCS\WordPressCodingStandards
19-
* @since 3.0.0 The property in this class was previously contained in the
20-
* `WordPressCS\WordPress\Sniff` class and has been moved here.
18+
* @since 3.0.0 The property in this class was previously contained in the
19+
* `WordPressCS\WordPress\Sniff` class and has been moved here.
2120
*/
2221
final class ArrayWalkingFunctionsHelper {
2322

WordPress/Helpers/ConstantsHelper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@
2828
*
2929
* @internal
3030
*
31-
* @package WPCS\WordPressCodingStandards
32-
* @since 3.0.0 The method in this class was previously contained in the
33-
* `WordPressCS\WordPress\Sniff` class and has been moved here.
31+
* @since 3.0.0 The method in this class was previously contained in the
32+
* `WordPressCS\WordPress\Sniff` class and has been moved here.
3433
*/
3534
final class ConstantsHelper {
3635

WordPress/Helpers/ContextHelper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
*
2626
* @internal
2727
*
28-
* @package WPCS\WordPressCodingStandards
29-
* @since 3.0.0 The methods in this class were previously contained in the
30-
* `WordPressCS\WordPress\Sniff` class and have been moved here.
28+
* @since 3.0.0 The methods in this class were previously contained in the
29+
* `WordPressCS\WordPress\Sniff` class and have been moved here.
3130
*/
3231
final class ContextHelper {
3332

WordPress/Helpers/DeprecationHelper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
*
2626
* @internal
2727
*
28-
* @package WPCS\WordPressCodingStandards
29-
* @since 3.0.0 The method in this class was previously contained in the
30-
* `WordPressCS\WordPress\Sniff` class and has been moved here.
28+
* @since 3.0.0 The method in this class was previously contained in the
29+
* `WordPressCS\WordPress\Sniff` class and has been moved here.
3130
*/
3231
final class DeprecationHelper {
3332

WordPress/Helpers/EscapingFunctionsTrait.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919
* - `customEscapingFunctions`.
2020
* - `customAutoEscapedFunctions`
2121
*
22-
* @package WPCS\WordPressCodingStandards
23-
* @since 3.0.0 The properties in this trait were previously contained partially in the
24-
* `WordPressCS\WordPress\Sniff` class and partially in the `EscapeOutputSniff`
25-
* class and have been moved here.
22+
* @since 3.0.0 The properties in this trait were previously contained partially in the
23+
* `WordPressCS\WordPress\Sniff` class and partially in the `EscapeOutputSniff`
24+
* class and have been moved here.
2625
*/
2726
trait EscapingFunctionsTrait {
2827

WordPress/Helpers/FormattingFunctionsHelper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
/**
1313
* Helper functions and function lists for checking whether a function is a formatting function.
1414
*
15-
* @package WPCS\WordPressCodingStandards
16-
* @since 3.0.0 The property in this class was previously contained in the
17-
* `WordPressCS\WordPress\Sniff` class and has been moved here.
15+
* @since 3.0.0 The property in this class was previously contained in the
16+
* `WordPressCS\WordPress\Sniff` class and has been moved here.
1817
*/
1918
final class FormattingFunctionsHelper {
2019

0 commit comments

Comments
 (0)