From a59de24826b3a07795375f54adee657fe6f7049f Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Fri, 27 Sep 2024 23:53:11 +0100 Subject: [PATCH] Rename variable Signed-off-by: Kamil Tekiela --- src/Controllers/Table/ReplaceController.php | 6 +++--- src/InsertEdit.php | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Controllers/Table/ReplaceController.php b/src/Controllers/Table/ReplaceController.php index ebfff1ba34..58abb6da22 100644 --- a/src/Controllers/Table/ReplaceController.php +++ b/src/Controllers/Table/ReplaceController.php @@ -381,7 +381,7 @@ final class ReplaceController implements InvocableController { $relFieldsList = $request->getParsedBodyParam('rel_fields_list', ''); if ($relFieldsList !== '') { - $map = $this->relation->getForeigners(Current::$database, Current::$table); + $foreigners = $this->relation->getForeigners(Current::$database, Current::$table); /** @var array $relationFields */ $relationFields = []; @@ -393,12 +393,12 @@ final class ReplaceController implements InvocableController $whereComparison = "='" . $relationFieldValue . "'"; $dispval = $this->insertEdit->getDisplayValueForForeignTableColumn( $whereComparison, - $map, + $foreigners, $relationField, ); $extraData['relations'][$cellIndex] = $this->insertEdit->getLinkForRelationalDisplayField( - $map, + $foreigners, $relationField, $whereComparison, $dispval, diff --git a/src/InsertEdit.php b/src/InsertEdit.php index 47277e663f..770025fecf 100644 --- a/src/InsertEdit.php +++ b/src/InsertEdit.php @@ -976,18 +976,18 @@ class InsertEdit * Column to display from the foreign table? * * @param string $whereComparison string that contain relation field value - * @param mixed[] $map all Relations to foreign tables for a given - * table or optionally a given column in a table + * @param mixed[] $foreigners all Relations to foreign tables for a given + * table or optionally a given column in a table * @param string $relationField relation field * * @return string display value from the foreign table */ public function getDisplayValueForForeignTableColumn( string $whereComparison, - array $map, + array $foreigners, string $relationField, ): string { - $foreigner = $this->relation->searchColumnInForeigners($map, $relationField); + $foreigner = $this->relation->searchColumnInForeigners($foreigners, $relationField); if (! is_array($foreigner)) { return ''; @@ -1013,8 +1013,8 @@ class InsertEdit /** * Display option in the cell according to user choices * - * @param mixed[] $map all Relations to foreign tables for a given - * table or optionally a given column in a table + * @param mixed[] $foreigners all Relations to foreign tables for a given + * table or optionally a given column in a table * @param string $relationField relation field * @param string $whereComparison string that contain relation field value * @param string $dispval display value from the foreign table @@ -1023,13 +1023,13 @@ class InsertEdit * @return string HTML tag */ public function getLinkForRelationalDisplayField( - array $map, + array $foreigners, string $relationField, string $whereComparison, string $dispval, string $relationFieldValue, ): string { - $foreigner = $this->relation->searchColumnInForeigners($map, $relationField); + $foreigner = $this->relation->searchColumnInForeigners($foreigners, $relationField); if (! is_array($foreigner)) { return '';