@@ -61,7 +61,7 @@ class EscapeOutputSniff extends AbstractFunctionRestrictionsSniff {
61
61
* @since 0.11.0 Changed from public static to protected non-static.
62
62
* @since 3.0.0 The format of the array values has changed from plain string to array.
63
63
*
64
- * @var array
64
+ * @var array<string, array>
65
65
*/
66
66
protected $ unsafePrintingFunctions = array (
67
67
'_e ' => array (
@@ -83,7 +83,7 @@ class EscapeOutputSniff extends AbstractFunctionRestrictionsSniff {
83
83
*
84
84
* @since 1.0.0
85
85
*
86
- * @var array
86
+ * @var array<string, bool>
87
87
*/
88
88
private $ safe_php_constants = array (
89
89
'PHP_EOL ' => true , // String.
@@ -103,7 +103,7 @@ class EscapeOutputSniff extends AbstractFunctionRestrictionsSniff {
103
103
*
104
104
* @since 0.12.0
105
105
*
106
- * @var array
106
+ * @var array<string|int, string|int>
107
107
*/
108
108
private $ safe_components = array (
109
109
\T_LNUMBER => \T_LNUMBER ,
@@ -134,7 +134,7 @@ class EscapeOutputSniff extends AbstractFunctionRestrictionsSniff {
134
134
/**
135
135
* Returns an array of tokens this test wants to listen for.
136
136
*
137
- * @return array
137
+ * @return string|int[]
138
138
*/
139
139
public function register () {
140
140
// Enrich the list of "safe components" tokens.
@@ -560,7 +560,7 @@ protected function check_code_is_escaped( $start, $end ) {
560
560
continue ;
561
561
}
562
562
563
- // Handle safe PHP native constants.
563
+ // Ignore safe PHP native constants.
564
564
if ( \T_STRING === $ this ->tokens [ $ i ]['code ' ]
565
565
&& isset ( $ this ->safe_php_constants [ $ this ->tokens [ $ i ]['content ' ] ] )
566
566
&& ConstantsHelper::is_use_of_global_constant ( $ this ->phpcsFile , $ i )
0 commit comments