Skip to content

Commit 70f315d

Browse files
committed
Rename vars
1 parent e4cb96d commit 70f315d

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

api.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -823,15 +823,15 @@ private function loadTables(bool $useCache): ReflectedDatabase
823823
return $tables;
824824
}
825825

826-
private function loadTable(String $name, bool $useCache): ReflectedTable
826+
private function loadTable(String $tableName, bool $useCache): ReflectedTable
827827
{
828-
$data = $useCache ? $this->cache->get("ReflectedTable($name)") : '';
828+
$data = $useCache ? $this->cache->get("ReflectedTable($tableName)") : '';
829829
if ($data != '') {
830830
$table = ReflectedTable::fromJson(json_decode(gzuncompress($data)));
831831
} else {
832-
$table = ReflectedTable::fromReflection($this->db->reflection(), $name);
832+
$table = ReflectedTable::fromReflection($this->db->reflection(), $tableName);
833833
$data = gzcompress(json_encode($table, JSON_UNESCAPED_UNICODE));
834-
$this->cache->set("ReflectedTable($name)", $data, $this->ttl);
834+
$this->cache->set("ReflectedTable($tableName)", $data, $this->ttl);
835835
}
836836
return $table;
837837
}
@@ -846,17 +846,17 @@ public function refreshTable(String $tableName)
846846
$this->tables[$tableName] = $this->loadTable($tableName, false);
847847
}
848848

849-
public function hasTable(String $table): bool
849+
public function hasTable(String $tableName): bool
850850
{
851-
return $this->database->exists($table);
851+
return $this->database->exists($tableName);
852852
}
853853

854-
public function getTable(String $table): ReflectedTable
854+
public function getTable(String $tableName): ReflectedTable
855855
{
856-
if (!isset($this->tables[$table])) {
857-
$this->tables[$table] = $this->loadTable($table, true);
856+
if (!isset($this->tables[$tableName])) {
857+
$this->tables[$tableName] = $this->loadTable($tableName, true);
858858
}
859-
return $this->tables[$table];
859+
return $this->tables[$tableName];
860860
}
861861

862862
public function getTableNames(): array

src/Tqdev/PhpCrudApi/Column/ReflectionService.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ private function loadTables(bool $useCache): ReflectedDatabase
3636
return $tables;
3737
}
3838

39-
private function loadTable(String $name, bool $useCache): ReflectedTable
39+
private function loadTable(String $tableName, bool $useCache): ReflectedTable
4040
{
41-
$data = $useCache ? $this->cache->get("ReflectedTable($name)") : '';
41+
$data = $useCache ? $this->cache->get("ReflectedTable($tableName)") : '';
4242
if ($data != '') {
4343
$table = ReflectedTable::fromJson(json_decode(gzuncompress($data)));
4444
} else {
45-
$table = ReflectedTable::fromReflection($this->db->reflection(), $name);
45+
$table = ReflectedTable::fromReflection($this->db->reflection(), $tableName);
4646
$data = gzcompress(json_encode($table, JSON_UNESCAPED_UNICODE));
47-
$this->cache->set("ReflectedTable($name)", $data, $this->ttl);
47+
$this->cache->set("ReflectedTable($tableName)", $data, $this->ttl);
4848
}
4949
return $table;
5050
}
@@ -59,17 +59,17 @@ public function refreshTable(String $tableName)
5959
$this->tables[$tableName] = $this->loadTable($tableName, false);
6060
}
6161

62-
public function hasTable(String $table): bool
62+
public function hasTable(String $tableName): bool
6363
{
64-
return $this->database->exists($table);
64+
return $this->database->exists($tableName);
6565
}
6666

67-
public function getTable(String $table): ReflectedTable
67+
public function getTable(String $tableName): ReflectedTable
6868
{
69-
if (!isset($this->tables[$table])) {
70-
$this->tables[$table] = $this->loadTable($table, true);
69+
if (!isset($this->tables[$tableName])) {
70+
$this->tables[$tableName] = $this->loadTable($tableName, true);
7171
}
72-
return $this->tables[$table];
72+
return $this->tables[$tableName];
7373
}
7474

7575
public function getTableNames(): array

0 commit comments

Comments
 (0)