From 08578b5e2e37e31e45d24c17c01a6b8bc0abd53b Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Mon, 13 Dec 2021 18:49:35 +0100
Subject: [PATCH] Continued: - renamed methods to make their purpose more clear
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Signed-off-by: Roland Häder <roland@mxchange.org>
---
 .../main/classes/handler/tasks/class_TaskHandler.php      | 2 +-
 .../classes/iterator/default/class_DefaultIterator.php    | 2 +-
 framework/main/classes/lists/class_BaseList.php           | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/framework/main/classes/handler/tasks/class_TaskHandler.php b/framework/main/classes/handler/tasks/class_TaskHandler.php
index ccd17aed..818ed694 100644
--- a/framework/main/classes/handler/tasks/class_TaskHandler.php
+++ b/framework/main/classes/handler/tasks/class_TaskHandler.php
@@ -177,7 +177,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
 		$key = $this->getListInstance()->getIterator()->key();
 
 		// Get the hash from key
-		$hash = $this->getListInstance()->getHash($key);
+		$hash = $this->getListInstance()->getHashByIndex($key);
 
 		// Update the entry
 		$this->getListInstance()->updateCurrentEntryByHash($hash, $taskEntry);
diff --git a/framework/main/classes/iterator/default/class_DefaultIterator.php b/framework/main/classes/iterator/default/class_DefaultIterator.php
index c7f8e132..8fecf9b6 100644
--- a/framework/main/classes/iterator/default/class_DefaultIterator.php
+++ b/framework/main/classes/iterator/default/class_DefaultIterator.php
@@ -82,7 +82,7 @@ class DefaultIterator extends BaseIterator implements Iterator, Registerable {
 		}
 
 		// Now get the entry
-		$current = $this->getListInstance()->getEntry($this->key());
+		$current = $this->getListInstance()->getEntryByIndex($this->key());
 
 		// Return it
 		return $current;
diff --git a/framework/main/classes/lists/class_BaseList.php b/framework/main/classes/lists/class_BaseList.php
index 8b6fdde1..c1ac982e 100644
--- a/framework/main/classes/lists/class_BaseList.php
+++ b/framework/main/classes/lists/class_BaseList.php
@@ -418,7 +418,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
 	 * @param	$hashIndex	Index holding the hash
 	 * @return	$hash		The hash
 	 */
-	public final function getHash ($hashIndex) {
+	public final function getHashByIndex (int $hashIndex) {
 		// Get it ...
 		$hash = $this->listIndex[$hashIndex];
 
@@ -433,9 +433,9 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
 	 * @return	$entry		Solved entry from list
 	 * @throws	InvalidListHashException	If the solved hash index is invalid
 	 */
-	public function getEntry ($hashIndex) {
+	public function getEntryByIndex (int $hashIndex) {
 		// Get the hash value
-		$hash = $this->getHash($hashIndex);
+		$hash = $this->getHashByIndex($hashIndex);
 
 		// Is the hash valid?
 		if (!$this->isHashValid($hash)) {
@@ -483,7 +483,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate
 			$entryIndex = $iteratorInstance->key();
 
 			// ... and the final entry which is the stored instance
-			$entry = $this->getEntry($entryIndex);
+			$entry = $this->getEntryByIndex($entryIndex);
 
 			// Add it to the list
 			//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: Adding entry ' . $entry . ' ...');
-- 
2.39.5