@@ -141,7 +141,7 @@ public function register() {
141
141
$ this ->safe_components += Tokens::$ booleanOperators ;
142
142
$ this ->safe_components += Collections::incrementDecrementOperators ();
143
143
144
- // Set up the tokens the sniff should listen too .
144
+ // Set up the tokens the sniff should listen to .
145
145
$ targets = array_merge ( parent ::register (), $ this ->target_keywords );
146
146
$ targets [] = \T_ECHO ;
147
147
$ targets [] = \T_OPEN_TAG_WITH_ECHO ;
@@ -157,7 +157,7 @@ public function register() {
157
157
* @return array
158
158
*/
159
159
public function getGroups () {
160
- // Make sure all array keys are lowercase (could contain user provided function names).
160
+ // Make sure all array keys are lowercase (could contain user- provided function names).
161
161
$ printing_functions = array_change_key_case ( $ this ->get_printing_functions (), \CASE_LOWER );
162
162
163
163
// Remove the unsafe printing functions to prevent duplicate notices.
@@ -237,7 +237,7 @@ public function process_token( $stackPtr ) {
237
237
if ( \T_OPEN_PARENTHESIS !== $ this ->tokens [ $ next_relevant ]['code ' ]
238
238
|| isset ( $ this ->tokens [ $ next_relevant ]['parenthesis_closer ' ] ) === false
239
239
) {
240
- // Live codind /parse error or a pre-created exception. Nothing to do for us.
240
+ // Live coding /parse error or a pre-created exception. Nothing to do for us.
241
241
return ;
242
242
}
243
243
@@ -470,7 +470,7 @@ protected function check_code_is_escaped( $start, $end, $code = 'OutputNotEscape
470
470
&& $ this ->tokens [ $ next_non_empty ]['parenthesis_closer ' ] !== $ last_non_empty
471
471
)
472
472
) {
473
- // If there is a (long) ternary skip over the part before the ?.
473
+ // If there is a (long) ternary, skip over the part before the ?.
474
474
$ ternary = $ this ->find_long_ternary ( $ start , $ end );
475
475
if ( false !== $ ternary ) {
476
476
$ start = ( $ ternary + 1 );
@@ -503,7 +503,7 @@ protected function check_code_is_escaped( $start, $end, $code = 'OutputNotEscape
503
503
}
504
504
505
505
if ( $ in_cast ) {
506
- // Skip to the end of a function call if it has been casted to a safe value.
506
+ // Skip to the end of a function call if it has been cast to a safe value.
507
507
$ i = $ this ->tokens [ $ i ]['parenthesis_closer ' ];
508
508
$ in_cast = false ;
509
509
@@ -625,7 +625,7 @@ protected function check_code_is_escaped( $start, $end, $code = 'OutputNotEscape
625
625
if ( isset ( ContextHelper::get_safe_cast_tokens ()[ $ this ->tokens [ $ i ]['code ' ] ] ) ) {
626
626
/*
627
627
* If the next thing is a match expression, skip over it as whatever is
628
- * being returned will be safe casted .
628
+ * being returned will be safely cast .
629
629
* Do not set `$in_cast` to `true`.
630
630
*/
631
631
$ next_non_empty = $ this ->phpcsFile ->findNext ( Tokens::$ emptyTokens , ( $ i + 1 ), $ end , true );
@@ -660,7 +660,7 @@ protected function check_code_is_escaped( $start, $end, $code = 'OutputNotEscape
660
660
continue ;
661
661
}
662
662
663
- // Now check that next token is a function call.
663
+ // Now check that the next token is a function call.
664
664
if ( \T_STRING === $ this ->tokens [ $ i ]['code ' ] ) {
665
665
$ ptr = $ i ;
666
666
$ functionName = $ this ->tokens [ $ i ]['content ' ];
@@ -893,7 +893,7 @@ private function walk_match_expression( $stackPtr, $code ) {
893
893
// Now check that the value returned by this match "leaf" is correctly escaped.
894
894
$ this ->check_code_is_escaped ( $ item_start , $ item_end , $ code );
895
895
896
- // Independently of whether or not the check was succesfull or ran into (parse error) problems,
896
+ // Independently of whether or not the check was successful or ran into (parse error) problems,
897
897
// always skip to the identified end of the item.
898
898
$ current = $ item_end ;
899
899
} while ( $ current < $ end );
0 commit comments