Skip to content

Commit b6e6b55

Browse files
committed
FormattingFunctionsHelper::is_formatting_function(): update for PHPCS 4.0
Use `ltrim()` to strip the leading backslash from fully qualified function names, ensuring they are correctly recognized when tokenized as `T_NAME_FULLY_QUALIFIED` in PHPCS 4.0.
1 parent 0ee9d1d commit b6e6b55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WordPress/Helpers/FormattingFunctionsHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ final class FormattingFunctionsHelper {
5555
* @return bool
5656
*/
5757
public static function is_formatting_function( $functionName ) {
58-
return isset( self::$formattingFunctions[ strtolower( $functionName ) ] );
58+
return isset( self::$formattingFunctions[ strtolower( ltrim( $functionName, '\\' ) ) ] );
5959
}
6060
}

0 commit comments

Comments
 (0)