From 566d2dfd919970e95f3b40891e065994ad53ab43 Mon Sep 17 00:00:00 2001
From: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Date: Fri, 20 Oct 2023 16:17:29 -0700
Subject: [PATCH] Rename File prop from key to hash
---
.../src/Internal/Admin/Logging/FileV2/File.php | 14 +++++++-------
.../Internal/Admin/Logging/FileV2/ListTable.php | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php b/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php
index 1bce0c7ce06..24728642dd5 100644
--- a/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php
+++ b/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php
@@ -30,11 +30,11 @@ class File {
protected $created;
/**
- * The key property of the file, derived from the filename.
+ * The hash property of the file, derived from the filename.
*
* @var string
*/
- protected $key;
+ protected $hash;
/**
* Class File
@@ -66,11 +66,11 @@ class File {
if ( count( $segments ) >= 5 ) {
$this->source = implode( '-', array_slice( $segments, 0, -4 ) );
$this->created = strtotime( implode( '-', array_slice( $segments, -4, 3 ) ) );
- $this->key = array_slice( $segments, -1 )[0];
+ $this->hash = array_slice( $segments, -1 )[0];
} else {
$this->source = implode( '-', $segments );
$this->created = filemtime( $this->path );
- $this->key = $this->source;
+ $this->hash = $this->source;
}
}
@@ -93,12 +93,12 @@ class File {
}
/**
- * Get the file's key property.
+ * Get the file's hash property.
*
* @return string
*/
- public function get_key() {
- return $this->key;
+ public function get_hash() {
+ return $this->hash;
}
/**
diff --git a/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/ListTable.php b/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/ListTable.php
index 64d5d915fdf..716ebe02c7b 100644
--- a/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/ListTable.php
+++ b/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/ListTable.php
@@ -220,12 +220,12 @@ class ListTable extends WP_List_Table {
ob_start();
?>
-