Skip to content

Commit

Permalink
Minor doc tweaks
Browse files Browse the repository at this point in the history
Follow up on 2249 and 2250.
  • Loading branch information
jrfnl committed Jun 16, 2023
1 parent 2e72cd6 commit 46295e8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
20 changes: 10 additions & 10 deletions WordPress/Helpers/EscapingFunctionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* - `customAutoEscapedFunctions`
*
* @package WPCS\WordPressCodingStandards
* @since 3.0.0 The properties this trait were previously contained partially in the
* @since 3.0.0 The properties in this trait were previously contained partially in the
* `WordPressCS\WordPress\Sniff` class and partially in the `EscapeOutputSniff`
* class and have been moved here.
*/
Expand All @@ -30,7 +30,7 @@ trait EscapingFunctionsTrait {
* Custom list of functions which escape values for display.
*
* @since 0.5.0
* @since 3.0.0 Moved from the EscapeOutput Sniff class to this class.
* @since 3.0.0 Moved from the EscapeOutput Sniff class to this trait.
*
* @var string|string[]
*/
Expand All @@ -40,7 +40,7 @@ trait EscapingFunctionsTrait {
* Custom list of functions whose return values are pre-escaped for display.
*
* @since 0.3.0
* @since 3.0.0 Moved from the EscapeOutput Sniff class to this class.
* @since 3.0.0 Moved from the EscapeOutput Sniff class to this trait.
*
* @var string|string[]
*/
Expand All @@ -51,10 +51,10 @@ trait EscapingFunctionsTrait {
*
* @since 0.5.0
* @since 0.11.0 Changed from public static to protected non-static.
* @since 3.0.0 - Moved from the Sniff class to this class.
* @since 3.0.0 - Moved from the Sniff class to this trait.
* - Visibility changed from protected to private.
*
* @var array
* @var array<string, bool>
*/
private $escapingFunctions = array(
'absint' => true,
Expand Down Expand Up @@ -100,10 +100,10 @@ trait EscapingFunctionsTrait {
*
* @since 0.5.0
* @since 0.11.0 Changed from public static to protected non-static.
* @since 3.0.0 - Moved from the Sniff class to this class.
* @since 3.0.0 - Moved from the Sniff class to this trait.
* - Visibility changed from protected to private.
*
* @var array
* @var array<string, bool>
*/
private $autoEscapedFunctions = array(
'allowed_tags' => true,
Expand Down Expand Up @@ -174,7 +174,7 @@ trait EscapingFunctionsTrait {
* @since 0.4.0
* @since 0.11.0 - Changed from public static to protected non-static.
* - Changed the format from simple bool to array.
* @since 3.0.0 - Moved from the EscapeOutput Sniff class to this class.
* @since 3.0.0 - Moved from the EscapeOutput Sniff class to this trait.
* - Visibility changed from protected to private.
*
* @var array
Expand All @@ -189,7 +189,7 @@ trait EscapingFunctionsTrait {
*
* @since 3.0.0
*
* @var array
* @var array<string, bool>
*/
private $allEscapingFunctions = array();

Expand All @@ -198,7 +198,7 @@ trait EscapingFunctionsTrait {
*
* @since 3.0.0
*
* @var array
* @var array<string, bool>
*/
private $allAutoEscapedFunctions = array();

Expand Down
12 changes: 6 additions & 6 deletions WordPress/Helpers/PrintingFunctionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ trait PrintingFunctionsTrait {
* Custom list of functions which print output incorporating the passed values.
*
* @since 0.4.0
* @since 3.0.0 Moved from the EscapeOutput Sniff class to this class.
* @since 3.0.0 Moved from the EscapeOutput Sniff class to this trait.
*
* @var string|string[]
*/
Expand All @@ -40,10 +40,10 @@ trait PrintingFunctionsTrait {
*
* @since 0.5.0
* @since 0.11.0 Changed from public static to protected non-static.
* @since 3.0.0 - Moved from the Sniff class to this class.
* @since 3.0.0 - Moved from the Sniff class to this trait.
* - Visibility changed from protected to private.
*
* @var array
* @var array<string, bool>
*/
private $printingFunctions = array(
'_deprecated_argument' => true,
Expand All @@ -70,10 +70,10 @@ trait PrintingFunctionsTrait {
* @since 0.4.0
* @since 0.11.0 - Changed from public static to protected non-static.
* - Changed the format from simple bool to array.
* @since 3.0.0 - Moved from the EscapeOutput Sniff class to this class.
* @since 3.0.0 - Moved from the EscapeOutput Sniff class to this trait.
* - Visibility changed from protected to private.
*
* @var array
* @var string|string[]
*/
private $addedCustomPrintingFunctions = array();

Expand All @@ -82,7 +82,7 @@ trait PrintingFunctionsTrait {
*
* @since 3.0.0
*
* @var array
* @var array<string, bool>
*/
private $allPrintingFunctions = array();

Expand Down
4 changes: 4 additions & 0 deletions WordPress/Sniffs/Security/EscapeOutputSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
* echo tags `<?=`.
* @since 0.13.0 Class name changed: this class is now namespaced.
* @since 1.0.0 This sniff has been moved from the `XSS` category to the `Security` category.
*
* @uses \WordPressCS\WordPress\Helpers\EscapingFunctionsTrait::$customEscapingFunctions
* @uses \WordPressCS\WordPress\Helpers\EscapingFunctionsTrait::$customAutoEscapedFunctions
* @uses \WordPressCS\WordPress\Helpers\PrintingFunctionsTrait::$customPrintingFunctions
*/
class EscapeOutputSniff extends Sniff {

Expand Down

0 comments on commit 46295e8

Please sign in to comment.