Skip to content

Commit a0c5186

Browse files
committed
Implement code review suggestion
1 parent 33126c0 commit a0c5186

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

WordPress/Sniffs/WP/AlternativeFunctionsSniff.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,8 @@ public function process_matched_token( $stackPtr, $group_name, $matched_content
353353
*/
354354
protected function is_local_data_stream( $clean_param_value ) {
355355

356-
$stripped = TextStrings::stripQuotes( $clean_param_value );
357-
358-
if ( strpos( $clean_param_value, '\\' ) === 0 ) {
359-
$clean_param_value = substr( $clean_param_value, 1 );
360-
}
356+
$stripped = TextStrings::stripQuotes( $clean_param_value );
357+
$clean_param_value = ltrim( $clean_param_value, '\\' );
361358

362359
if ( isset( $this->allowed_local_streams[ $stripped ] )
363360
|| isset( $this->allowed_local_stream_constants[ $clean_param_value ] )

0 commit comments

Comments
 (0)