From acc98a1d6ac73c318d254a34b78bda76c9db8aee Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Fri, 16 Dec 2016 20:44:09 +0100 Subject: [PATCH] Mark WC_Log_Handler::format_entry abstract --- includes/abstracts/abstract-wc-log-handler.php | 4 ++-- includes/log-handlers/class-wc-log-handler-file.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/abstracts/abstract-wc-log-handler.php b/includes/abstracts/abstract-wc-log-handler.php index 5a4e5e0c2a7..7de5c76cc16 100644 --- a/includes/abstracts/abstract-wc-log-handler.php +++ b/includes/abstracts/abstract-wc-log-handler.php @@ -46,8 +46,8 @@ abstract class WC_Log_Handler { * * @return string Formatted log entry. */ - public function format_entry( $timestamp, $level, $message, $context ) { - $time_string = $this->format_time( $timestamp ); + public static function format_entry( $timestamp, $level, $message, $context ) { + $time_string = self::format_time( $timestamp ); $level_string = strtoupper( $level ); $entry = "{$time_string} {$level_string} {$message}"; diff --git a/includes/log-handlers/class-wc-log-handler-file.php b/includes/log-handlers/class-wc-log-handler-file.php index 4b2e7b63e25..984279d77ad 100644 --- a/includes/log-handlers/class-wc-log-handler-file.php +++ b/includes/log-handlers/class-wc-log-handler-file.php @@ -79,7 +79,7 @@ class WC_Log_Handler_File extends WC_Log_Handler { $handle = 'log'; } - $entry = $this->format_entry( $timestamp, $level, $message, $context ); + $entry = self::format_entry( $timestamp, $level, $message, $context ); return $this->add( $entry, $handle ); } @@ -94,7 +94,7 @@ class WC_Log_Handler_File extends WC_Log_Handler { * * @return string Formatted log entry. */ - public function format_entry( $timestamp, $level, $message, $context ) { + public static function format_entry( $timestamp, $level, $message, $context ) { if ( isset( $context['_legacy'] ) && true === $context['_legacy'] ) { if ( isset( $context['tag'] ) && $context['tag'] ) {