Skip to content

Commit bb0b7d6

Browse files
committed
Security/EscapeOutput: various minor docs fixes
1 parent f165714 commit bb0b7d6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

WordPress/Sniffs/Security/EscapeOutputSniff.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class EscapeOutputSniff extends AbstractFunctionRestrictionsSniff {
6161
* @since 0.11.0 Changed from public static to protected non-static.
6262
* @since 3.0.0 The format of the array values has changed from plain string to array.
6363
*
64-
* @var array
64+
* @var array<string, array>
6565
*/
6666
protected $unsafePrintingFunctions = array(
6767
'_e' => array(
@@ -83,7 +83,7 @@ class EscapeOutputSniff extends AbstractFunctionRestrictionsSniff {
8383
*
8484
* @since 1.0.0
8585
*
86-
* @var array
86+
* @var array<string, bool>
8787
*/
8888
private $safe_php_constants = array(
8989
'PHP_EOL' => true, // String.
@@ -103,7 +103,7 @@ class EscapeOutputSniff extends AbstractFunctionRestrictionsSniff {
103103
*
104104
* @since 0.12.0
105105
*
106-
* @var array
106+
* @var array<string|int, string|int>
107107
*/
108108
private $safe_components = array(
109109
\T_LNUMBER => \T_LNUMBER,
@@ -134,7 +134,7 @@ class EscapeOutputSniff extends AbstractFunctionRestrictionsSniff {
134134
/**
135135
* Returns an array of tokens this test wants to listen for.
136136
*
137-
* @return array
137+
* @return string|int[]
138138
*/
139139
public function register() {
140140
// Enrich the list of "safe components" tokens.
@@ -560,7 +560,7 @@ protected function check_code_is_escaped( $start, $end ) {
560560
continue;
561561
}
562562

563-
// Handle safe PHP native constants.
563+
// Ignore safe PHP native constants.
564564
if ( \T_STRING === $this->tokens[ $i ]['code']
565565
&& isset( $this->safe_php_constants[ $this->tokens[ $i ]['content'] ] )
566566
&& ConstantsHelper::is_use_of_global_constant( $this->phpcsFile, $i )

0 commit comments

Comments
 (0)