From 2f7c31f42430f2133bd9d081bea74c48921a229f Mon Sep 17 00:00:00 2001 From: jrfnl Date: Tue, 4 Jul 2023 02:58:33 +0200 Subject: [PATCH] Docs: clarify the `$matched_content` parameter When the `$matched_content` param is passed from the `AbstractFunctionRestrictionsSniff` or, by extension, from the `AbstractFunctionParameterSniff``, it will always already be in lowercase. When the `$matched_content` param is passed from the `AbstractClassRestrictionsSniff` sniff it will be in its original case. This commit updates the docs of all involved methods to include information about the case of the content of `$matched_content` to clarify this. Includes removing two unnecessary calls to `strtolower()` in child classes. Includes overloading the `process_matched_token()` method in the `AbstractClassRestrictionsSniff`, not because the code does anything different, but only to ensure the docblock annotates correctly that in child classes of that abstract the `$matched_content` will be in its original case. --- WordPress/AbstractClassRestrictionsSniff.php | 20 +++++++++++++ WordPress/AbstractFunctionParameterSniff.php | 9 ++++-- .../AbstractFunctionRestrictionsSniff.php | 3 +- .../EscapedNotTranslatedSniff.php | 3 +- .../DateTime/CurrentTimeTimestampSniff.php | 3 +- .../PrefixAllGlobalsSniff.php | 3 +- .../NamingConventions/ValidHookNameSniff.php | 3 +- .../ValidPostTypeSlugSniff.php | 3 +- WordPress/Sniffs/PHP/IniSetSniff.php | 3 +- .../Sniffs/PHP/PregQuoteDelimiterSniff.php | 3 +- WordPress/Sniffs/PHP/StrictInArraySniff.php | 3 +- .../Sniffs/Security/PluginMenuSlugSniff.php | 3 +- .../Sniffs/Utils/I18nTextDomainFixerSniff.php | 6 ++-- .../Sniffs/WP/AlternativeFunctionsSniff.php | 3 +- WordPress/Sniffs/WP/CapabilitiesSniff.php | 6 ++-- WordPress/Sniffs/WP/ClassNameCaseSniff.php | 1 + .../Sniffs/WP/DeprecatedClassesSniff.php | 3 +- .../Sniffs/WP/DeprecatedFunctionsSniff.php | 15 +++++----- .../WP/DeprecatedParameterValuesSniff.php | 6 ++-- .../Sniffs/WP/DeprecatedParametersSniff.php | 3 +- .../Sniffs/WP/DiscouragedConstantsSniff.php | 6 ++-- .../WP/EnqueuedResourceParametersSniff.php | 3 +- WordPress/Sniffs/WP/I18nSniff.php | 30 ++++++++++++------- 23 files changed, 96 insertions(+), 45 deletions(-) diff --git a/WordPress/AbstractClassRestrictionsSniff.php b/WordPress/AbstractClassRestrictionsSniff.php index bd3b7aa949..65af629555 100644 --- a/WordPress/AbstractClassRestrictionsSniff.php +++ b/WordPress/AbstractClassRestrictionsSniff.php @@ -191,6 +191,26 @@ public function check_for_matches( $stackPtr ) { return min( $skip_to ); } + /** + * Process a matched token. + * + * @since 0.11.0 Split out from the `process()` method. + * + * @param int $stackPtr The position of the current token in the stack. + * @param string $group_name The name of the group which was matched. + * @param string $matched_content The token content (function name) which was matched + * in it original case. + * + * @return int|void Integer stack pointer to skip forward or void to continue + * normal file processing. + * + * @phpcs:disable Generic.CodeAnalysis.UselessOverridingMethod.Found + */ + public function process_matched_token( $stackPtr, $group_name, $matched_content ) { + parent::process_matched_token( $stackPtr, $group_name, $matched_content ); + } + // phpcs:enable + /** * Prepare the class name for use in a regular expression. * diff --git a/WordPress/AbstractFunctionParameterSniff.php b/WordPress/AbstractFunctionParameterSniff.php index 974edf116a..de3a94fb07 100644 --- a/WordPress/AbstractFunctionParameterSniff.php +++ b/WordPress/AbstractFunctionParameterSniff.php @@ -62,7 +62,8 @@ public function getGroups() { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * * @return int|void Integer stack pointer to skip forward or void to continue * normal file processing. @@ -85,7 +86,8 @@ public function process_matched_token( $stackPtr, $group_name, $matched_content * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return int|void Integer stack pointer to skip forward or void to continue @@ -101,7 +103,8 @@ abstract public function process_parameters( $stackPtr, $group_name, $matched_co * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * * @return int|void Integer stack pointer to skip forward or void to continue * normal file processing. diff --git a/WordPress/AbstractFunctionRestrictionsSniff.php b/WordPress/AbstractFunctionRestrictionsSniff.php index d9f1c1774e..186f01e881 100644 --- a/WordPress/AbstractFunctionRestrictionsSniff.php +++ b/WordPress/AbstractFunctionRestrictionsSniff.php @@ -320,7 +320,8 @@ public function check_for_matches( $stackPtr ) { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * * @return int|void Integer stack pointer to skip forward or void to continue * normal file processing. diff --git a/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php b/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php index cca0a8c50d..76d1d53bc2 100644 --- a/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php +++ b/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php @@ -57,7 +57,8 @@ final class EscapedNotTranslatedSniff extends AbstractFunctionParameterSniff { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/DateTime/CurrentTimeTimestampSniff.php b/WordPress/Sniffs/DateTime/CurrentTimeTimestampSniff.php index 6cac190e09..5d20f5866c 100644 --- a/WordPress/Sniffs/DateTime/CurrentTimeTimestampSniff.php +++ b/WordPress/Sniffs/DateTime/CurrentTimeTimestampSniff.php @@ -59,7 +59,8 @@ final class CurrentTimeTimestampSniff extends AbstractFunctionParameterSniff { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php b/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php index 03e72181af..b5073b0f3f 100644 --- a/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php +++ b/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php @@ -806,7 +806,8 @@ protected function process_list_assignment( $stackPtr ) { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php b/WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php index c04461dff4..77decc4803 100644 --- a/WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php +++ b/WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php @@ -87,7 +87,8 @@ public function getGroups() { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php b/WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php index 8b880f5648..7c5de5e79b 100644 --- a/WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php +++ b/WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php @@ -117,7 +117,8 @@ public function register() { * * @param int $stackPtr The position of the current token in the stack. * @param array $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/PHP/IniSetSniff.php b/WordPress/Sniffs/PHP/IniSetSniff.php index e6d825739f..0ce252b685 100644 --- a/WordPress/Sniffs/PHP/IniSetSniff.php +++ b/WordPress/Sniffs/PHP/IniSetSniff.php @@ -137,7 +137,8 @@ final class IniSetSniff extends AbstractFunctionParameterSniff { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/PHP/PregQuoteDelimiterSniff.php b/WordPress/Sniffs/PHP/PregQuoteDelimiterSniff.php index 2041468b88..91c1820ae9 100644 --- a/WordPress/Sniffs/PHP/PregQuoteDelimiterSniff.php +++ b/WordPress/Sniffs/PHP/PregQuoteDelimiterSniff.php @@ -50,7 +50,8 @@ final class PregQuoteDelimiterSniff extends AbstractFunctionParameterSniff { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/PHP/StrictInArraySniff.php b/WordPress/Sniffs/PHP/StrictInArraySniff.php index 9cf92719d6..fde2afaeab 100644 --- a/WordPress/Sniffs/PHP/StrictInArraySniff.php +++ b/WordPress/Sniffs/PHP/StrictInArraySniff.php @@ -77,7 +77,8 @@ final class StrictInArraySniff extends AbstractFunctionParameterSniff { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/Security/PluginMenuSlugSniff.php b/WordPress/Sniffs/Security/PluginMenuSlugSniff.php index 7f9fdacfe9..4b3f369e89 100644 --- a/WordPress/Sniffs/Security/PluginMenuSlugSniff.php +++ b/WordPress/Sniffs/Security/PluginMenuSlugSniff.php @@ -106,7 +106,8 @@ final class PluginMenuSlugSniff extends AbstractFunctionParameterSniff { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php b/WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php index e2a90d52af..88116e0b6d 100644 --- a/WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php +++ b/WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php @@ -467,7 +467,8 @@ public function process_token( $stackPtr ) { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void @@ -594,7 +595,8 @@ public function process_parameters( $stackPtr, $group_name, $matched_content, $p * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * * @return void */ diff --git a/WordPress/Sniffs/WP/AlternativeFunctionsSniff.php b/WordPress/Sniffs/WP/AlternativeFunctionsSniff.php index 3269bf2caa..3c50c34efd 100644 --- a/WordPress/Sniffs/WP/AlternativeFunctionsSniff.php +++ b/WordPress/Sniffs/WP/AlternativeFunctionsSniff.php @@ -214,7 +214,8 @@ public function getGroups() { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * * @return int|void Integer stack pointer to skip forward or void to continue * normal file processing. diff --git a/WordPress/Sniffs/WP/CapabilitiesSniff.php b/WordPress/Sniffs/WP/CapabilitiesSniff.php index 583a9e5160..cc185ad795 100644 --- a/WordPress/Sniffs/WP/CapabilitiesSniff.php +++ b/WordPress/Sniffs/WP/CapabilitiesSniff.php @@ -352,14 +352,14 @@ final class CapabilitiesSniff extends AbstractFunctionParameterSniff { * * @param int $stackPtr The position of the current token in the stack. * @param array $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void */ public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) { - $function_name_lc = strtolower( $matched_content ); - $function_details = $this->target_functions[ $function_name_lc ]; + $function_details = $this->target_functions[ $matched_content ]; $parameter = PassedParameters::getParameterFromStack( $parameters, diff --git a/WordPress/Sniffs/WP/ClassNameCaseSniff.php b/WordPress/Sniffs/WP/ClassNameCaseSniff.php index d974210e6f..11a622b073 100644 --- a/WordPress/Sniffs/WP/ClassNameCaseSniff.php +++ b/WordPress/Sniffs/WP/ClassNameCaseSniff.php @@ -630,6 +630,7 @@ public function getGroups() { * @param string $group_name The name of the group which was matched. Will * always be 'wp_classes'. * @param string $matched_content The token content (class name) which was matched. + * in its original case. * * @return void */ diff --git a/WordPress/Sniffs/WP/DeprecatedClassesSniff.php b/WordPress/Sniffs/WP/DeprecatedClassesSniff.php index b79ac75e1d..3dabfaca77 100644 --- a/WordPress/Sniffs/WP/DeprecatedClassesSniff.php +++ b/WordPress/Sniffs/WP/DeprecatedClassesSniff.php @@ -91,7 +91,8 @@ public function getGroups() { * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. Will * always be 'deprecated_classes'. - * @param string $matched_content The token content (class name) which was matched. + * @param string $matched_content The token content (class name) which was matched + * in its original case. * * @return void */ diff --git a/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php b/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php index c58390b665..c83aadafe5 100644 --- a/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php +++ b/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php @@ -1520,7 +1520,8 @@ public function getGroups() { * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. Will * always be 'deprecated_functions'. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * * @return void */ @@ -1528,24 +1529,22 @@ public function process_matched_token( $stackPtr, $group_name, $matched_content $this->set_minimum_wp_version(); - $function_name = strtolower( $matched_content ); - $message = '%s() has been deprecated since WordPress version %s.'; $data = array( - $matched_content, - $this->deprecated_functions[ $function_name ]['version'], + $this->tokens[ $stackPtr ]['content'], + $this->deprecated_functions[ $matched_content ]['version'], ); - if ( ! empty( $this->deprecated_functions[ $function_name ]['alt'] ) ) { + if ( ! empty( $this->deprecated_functions[ $matched_content ]['alt'] ) ) { $message .= ' Use %s instead.'; - $data[] = $this->deprecated_functions[ $function_name ]['alt']; + $data[] = $this->deprecated_functions[ $matched_content ]['alt']; } MessageHelper::addMessage( $this->phpcsFile, $message, $stackPtr, - ( $this->wp_version_compare( $this->deprecated_functions[ $function_name ]['version'], $this->minimum_wp_version, '<' ) ), + ( $this->wp_version_compare( $this->deprecated_functions[ $matched_content ]['version'], $this->minimum_wp_version, '<' ) ), MessageHelper::stringToErrorcode( $matched_content . 'Found' ), $data ); diff --git a/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php b/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php index fbe0d8a376..89915bc1d5 100644 --- a/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php +++ b/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php @@ -218,7 +218,8 @@ final class DeprecatedParameterValuesSniff extends AbstractFunctionParameterSnif * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void @@ -243,7 +244,8 @@ public function process_parameters( $stackPtr, $group_name, $matched_content, $p * * @since 1.0.0 * - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameter Array with start and end token positon of the parameter. * @param array $parameter_args Array with alternative and WordPress deprecation version of the parameter. * diff --git a/WordPress/Sniffs/WP/DeprecatedParametersSniff.php b/WordPress/Sniffs/WP/DeprecatedParametersSniff.php index a3a4ace94e..ca1c2f1bf3 100644 --- a/WordPress/Sniffs/WP/DeprecatedParametersSniff.php +++ b/WordPress/Sniffs/WP/DeprecatedParametersSniff.php @@ -316,7 +316,8 @@ final class DeprecatedParametersSniff extends AbstractFunctionParameterSniff { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php b/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php index 40a0ad14bb..c9c2e6df9b 100644 --- a/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php +++ b/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php @@ -201,14 +201,14 @@ public function process_arbitrary_tstring( $stackPtr ) { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void */ public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) { - $function_name = strtolower( $matched_content ); - $target_param = $this->target_functions[ $function_name ]; + $target_param = $this->target_functions[ $matched_content ]; // Was the target parameter passed ? $found_param = PassedParameters::getParameterFromStack( $parameters, $target_param['position'], $target_param['name'] ); diff --git a/WordPress/Sniffs/WP/EnqueuedResourceParametersSniff.php b/WordPress/Sniffs/WP/EnqueuedResourceParametersSniff.php index d2370f1b5b..47b82247b5 100644 --- a/WordPress/Sniffs/WP/EnqueuedResourceParametersSniff.php +++ b/WordPress/Sniffs/WP/EnqueuedResourceParametersSniff.php @@ -114,7 +114,8 @@ public function register() { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void diff --git a/WordPress/Sniffs/WP/I18nSniff.php b/WordPress/Sniffs/WP/I18nSniff.php index 4c97f934b9..f835bc34cf 100644 --- a/WordPress/Sniffs/WP/I18nSniff.php +++ b/WordPress/Sniffs/WP/I18nSniff.php @@ -262,7 +262,8 @@ public function process_token( $stackPtr ) { * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * * @return void */ @@ -293,7 +294,8 @@ public function process_matched_token( $stackPtr, $group_name, $matched_content * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * * @return void */ @@ -318,7 +320,8 @@ public function process_no_parameters( $stackPtr, $group_name, $matched_content * * @param int $stackPtr The position of the current token in the stack. * @param string $group_name The name of the group which was matched. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void @@ -408,7 +411,8 @@ public function process_parameters( $stackPtr, $group_name, $matched_content, $p * @since 3.0.0 Check moved from the `process_matched_token()` method to this method. * * @param int $stackPtr The position of the current token in the stack. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters The parameters array. * @param int $expected_count The expected number of passed arguments. * @@ -434,7 +438,8 @@ private function check_argument_count( $stackPtr, $matched_content, $parameters, * @since 3.0.0 Most of the logic in this method used to be contained in the, now removed, `check_argument_tokens()` method. * * @param int $stackPtr The position of the current token in the stack. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param string $param_name The name of the parameter being examined. * @param array|false $param_info Parameter info array for an individual parameter, * as received from the PassedParemeters class. @@ -534,7 +539,8 @@ private function check_argument_is_string_literal( $stackPtr, $matched_content, * * @since 3.0.0 The logic in this method used to be contained in the, now removed, `check_argument_tokens()` method. * - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param string $param_name The name of the parameter being examined. * @param array|false $param_info Parameter info array for an individual parameter, * as received from the PassedParemeters class. @@ -625,7 +631,8 @@ private function check_textdomain_matches( $matched_content, $param_name, $param * * @since 3.0.0 The logic in this method used to be contained in the, now removed, `check_text()` method. * - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param string $param_name The name of the parameter being examined. * @param array|false $param_info Parameter info array for an individual parameter, * as received from the PassedParemeters class. @@ -706,7 +713,8 @@ private function check_placeholders_in_string( $matched_content, $param_name, $p * * @since 3.0.0 The logic in this method used to be contained in the, now removed, `check_text()` method. * - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param string $param_name The name of the parameter being examined. * @param array|false $param_info Parameter info array for an individual parameter, * as received from the PassedParemeters class. @@ -740,7 +748,8 @@ private function check_string_has_translatable_content( $matched_content, $param * * @since 3.0.0 The logic in this method used to be contained in the, now removed, `check_text()` method. * - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param string $param_name The name of the parameter being examined. * @param array|false $param_info Parameter info array for an individual parameter, * as received from the PassedParemeters class. @@ -839,7 +848,8 @@ private function compare_single_and_plural_arguments( $stackPtr, $param_info_sin * - The method visibility has been changed from `protected` to `private`. * * @param int $stackPtr The position of the gettext call token in the stack. - * @param string $matched_content The token content (function name) which was matched. + * @param string $matched_content The token content (function name) which was matched + * in lowercase. * @param array $parameters Array with information about the parameters. * * @return void