Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Rename $function to prevent lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
opr committed Oct 31, 2023
1 parent fa44eef commit 1340d37
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Domain/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,33 +455,33 @@ function () {
/**
* Throws a deprecation notice for a dependency without breaking requests.
*
* @param string $function Class or function being deprecated.
* @param string $function_name Class or function being deprecated.
* @param string $version Version in which it was deprecated.
* @param string $replacement Replacement class or function, if applicable.
* @param string $trigger_error_version Optional version to start surfacing this as a PHP error rather than a log. Defaults to $version.
*/
protected function deprecated_dependency( $function, $version, $replacement = '', $trigger_error_version = '' ) {
protected function deprecated_dependency( $function_name, $version, $replacement = '', $trigger_error_version = '' ) {
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) {
return;
}

$trigger_error_version = $trigger_error_version ? $trigger_error_version : $version;
$error_message = $replacement ? sprintf(
'%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.',
$function,
$function_name,
$version,
$replacement
) : sprintf(
'%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.',
$function,
$function_name,
$version
);
/**
* Fires when a deprecated function is called.
*
* @since 7.3.0
*/
do_action( 'deprecated_function_run', $function, $replacement, $version );
do_action( 'deprecated_function_run', $function_name, $replacement, $version );

$log_error = false;

Expand Down

0 comments on commit 1340d37

Please sign in to comment.