Skip to content

Commit dc5c001

Browse files
committed
refactor: rename variable names
1 parent 72b8d96 commit dc5c001

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

system/Database/BaseBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3038,10 +3038,10 @@ protected function trackAliases($table)
30383038
$table = preg_replace('/\s+AS\s+/i', ' ', $table);
30393039

30403040
// Grab the alias
3041-
$table = trim(strrchr($table, ' '));
3041+
$alias = trim(strrchr($table, ' '));
30423042

30433043
// Store the alias, if it doesn't already exist
3044-
$this->db->addTableAlias($table);
3044+
$this->db->addTableAlias($alias);
30453045
}
30463046
}
30473047

system/Database/BaseConnection.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ abstract class BaseConnection implements ConnectionInterface
340340
/**
341341
* Array of table aliases.
342342
*
343-
* @var array
343+
* @var list<string>
344344
*/
345345
protected $aliasedTables = [];
346346

@@ -576,10 +576,10 @@ public function setAliasedTables(array $aliases)
576576
*
577577
* @return $this
578578
*/
579-
public function addTableAlias(string $table)
579+
public function addTableAlias(string $alias)
580580
{
581-
if (! in_array($table, $this->aliasedTables, true)) {
582-
$this->aliasedTables[] = $table;
581+
if (! in_array($alias, $this->aliasedTables, true)) {
582+
$this->aliasedTables[] = $alias;
583583
}
584584

585585
return $this;

0 commit comments

Comments
 (0)