fix: noverify --fix
This commit is contained in:
parent
5aff28d2b8
commit
117640a755
44 changed files with 174 additions and 174 deletions
|
|
@ -23,7 +23,7 @@ class Manager
|
|||
$this->DropTableQuery($action["table_name"], true);
|
||||
break;
|
||||
case "createTable":
|
||||
$constraints = isset($action["constraints"]) ? $action["constraints"] : null;
|
||||
$constraints = $action["constraints"] ?? null;
|
||||
$this->CreateTableQuery($action["table_name"], $action["fields"], $constraints);
|
||||
break;
|
||||
case "addColumn":
|
||||
|
|
@ -70,7 +70,7 @@ class Manager
|
|||
{
|
||||
$statement = "DROP TABLE IF EXISTS ".$table;
|
||||
if ($this->db->isPostgres()&&$cascade) {
|
||||
$statement = $statement." CASCADE";
|
||||
$statement .= " CASCADE";
|
||||
}
|
||||
$this->db->query($statement);
|
||||
}
|
||||
|
|
@ -201,7 +201,7 @@ class Manager
|
|||
{
|
||||
$pg = $this->db->isPostgres();
|
||||
|
||||
$result/*: array*/ = array();
|
||||
$result/*: array*/ = [];
|
||||
$data/*: array*/ = $this->db->fetchAllArray("SELECT * FROM ".$table_name.";");
|
||||
|
||||
if (!$pg) {
|
||||
|
|
@ -219,11 +219,11 @@ class Manager
|
|||
}
|
||||
}
|
||||
foreach ($data as $r) {
|
||||
$result[] = array(
|
||||
$result[] = [
|
||||
"type" => "insert",
|
||||
"table_name" => $table_name,
|
||||
"values" => $r
|
||||
);
|
||||
];
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
|
@ -246,7 +246,7 @@ class Manager
|
|||
public function DumpInserts()
|
||||
{
|
||||
$table_names = $this->GetAllTableNames();
|
||||
$result = array();
|
||||
$result = [];
|
||||
foreach ($table_names as $table_name) {
|
||||
$result = array_merge($result, $this->DumpTable($table_name));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
|
|||
}
|
||||
|
||||
function getString($name) {
|
||||
return isset($this->fields[$name]) ? $this->fields[$name]: null;
|
||||
return $this->fields[$name] ?? null;
|
||||
}
|
||||
|
||||
function getBoolean($name) {
|
||||
|
|
|
|||
|
|
@ -22,15 +22,15 @@ class Statement
|
|||
}
|
||||
|
||||
function setInt($n, $value) {
|
||||
$this->binds [] = array($n, $value, PDO::PARAM_INT);
|
||||
$this->binds [] = [$n, $value, PDO::PARAM_INT];
|
||||
}
|
||||
|
||||
function setString($n, $value) {
|
||||
$this->binds [] = array($n, $value, PDO::PARAM_STR);
|
||||
$this->binds [] = [$n, $value, PDO::PARAM_STR];
|
||||
}
|
||||
|
||||
function setBlob($n, $value) {
|
||||
$this->binds [] = array($n, $value, PDO::PARAM_LOB);
|
||||
$this->binds [] = [$n, $value, PDO::PARAM_LOB];
|
||||
}
|
||||
|
||||
function setLimit($limit) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue