]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 13 Dec 2021 17:49:35 +0000 (18:49 +0100)
committerRoland Häder <roland@mxchange.org>
Mon, 13 Dec 2021 17:49:35 +0000 (18:49 +0100)
- renamed methods to make their purpose more clear

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/main/classes/handler/tasks/class_TaskHandler.php
framework/main/classes/iterator/default/class_DefaultIterator.php
framework/main/classes/lists/class_BaseList.php

index ccd17aedc8fdd546a2fd41850e626fa50ac18fe3..818ed6947e4b4d442cd233343d791b4092c5cdcf 100644 (file)
@@ -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);
index c7f8e1320b551ddd70b8de2fb51b9897b0b19981..8fecf9b60647d0f419c0315237bd77ccd4eedd94 100644 (file)
@@ -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;
index 8b6fdde111c6d0d8adefd4541772f383ac50b3db..c1ac982eb154c8381622ff828c8107b193bf856a 100644 (file)
@@ -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 . ' ...');