Skip to content

Commit 0bb7a31

Browse files
committed
refactor: rename variable names
1 parent aea4197 commit 0bb7a31

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
@@ -3018,10 +3018,10 @@ protected function trackAliases($table)
30183018
$table = preg_replace('/\s+AS\s+/i', ' ', $table);
30193019

30203020
// Grab the alias
3021-
$table = trim(strrchr($table, ' '));
3021+
$alias = trim(strrchr($table, ' '));
30223022

30233023
// Store the alias, if it doesn't already exist
3024-
$this->db->addTableAlias($table);
3024+
$this->db->addTableAlias($alias);
30253025
}
30263026
}
30273027

system/Database/BaseConnection.php

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

@@ -561,10 +561,10 @@ public function setAliasedTables(array $aliases)
561561
*
562562
* @return $this
563563
*/
564-
public function addTableAlias(string $table)
564+
public function addTableAlias(string $alias)
565565
{
566-
if (! in_array($table, $this->aliasedTables, true)) {
567-
$this->aliasedTables[] = $table;
566+
if (! in_array($alias, $this->aliasedTables, true)) {
567+
$this->aliasedTables[] = $alias;
568568
}
569569

570570
return $this;

0 commit comments

Comments
 (0)