| @@ -1,9 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor\Core\Logger\Items; |
| 3 | 3 | |
| 4 | 4 | if ( ! defined( 'ABSPATH' ) ) { |
| 5 | - exit; // Exit if accessed directly. | |
| 5 | + exit; // Exit if accessed directly | |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | class Base implements Log_Item_Interface { |
| 9 | 9 | |
| @@ -42,9 +42,8 @@ | ||
| 42 | 42 | $vars = get_object_vars( $this ); |
| 43 | 43 | return strtr( static::FORMAT, $vars ); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - #[\ReturnTypeWillChange] | |
| 47 | 46 | public function jsonSerialize() { |
| 48 | 47 | return [ |
| 49 | 48 | 'class' => get_class( $this ), |
| 50 | 49 | 'item' => [ |
| @@ -103,9 +102,9 @@ | ||
| 103 | 102 | } |
| 104 | 103 | |
| 105 | 104 | public function get_fingerprint() { |
| 106 | 105 | $unique_key = $this->type . $this->message . var_export( $this->meta, true ); // @codingStandardsIgnoreLine |
| 107 | - // Info messages are not be aggregated: | |
| 106 | + //info messages are not be aggregated: | |
| 108 | 107 | if ( 'info' === $this->type ) { |
| 109 | 108 | $unique_key .= $this->date; |
| 110 | 109 | } |
| 111 | 110 | return md5( $unique_key ); |
| @@ -111,9 +110,9 @@ | ||
| 111 | 110 | return md5( $unique_key ); |
| 112 | 111 | } |
| 113 | 112 | |
| 114 | 113 | public function increase_times( $item, $truncate = true ) { |
| 115 | - ++$this->times; | |
| 114 | + $this->times++; | |
| 116 | 115 | $this->times_dates[] = $item->date; |
| 117 | 116 | |
| 118 | 117 | if ( $truncate && ( self::MAX_LOG_ENTRIES < count( $this->times_dates ) ) ) { |
| 119 | 118 | $this->times_dates = array_slice( $this->times_dates, -self::MAX_LOG_ENTRIES ); |