mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
fmt, typings, typos
This commit is contained in:
parent
eb997b5ba2
commit
7de4c35ab4
34 changed files with 644 additions and 1048 deletions
|
|
@ -32,14 +32,14 @@ if ('/upload' === $_SERVER['REQUEST_URI']) {
|
|||
require __DIR__ . '/../src/public/index.php';
|
||||
}
|
||||
|
||||
function clearDatabase(\Doctrine\DBAL\Connection $connection) {
|
||||
function clearDatabase(Doctrine\DBAL\Connection $connection) {
|
||||
$tables = $connection->getSchemaManager()->listTables();
|
||||
foreach ($tables as $table) {
|
||||
truncateTable($connection, $table->getName());
|
||||
}
|
||||
}
|
||||
|
||||
function truncateTable(\Doctrine\DBAL\Connection $connection, string $tableName) {
|
||||
function truncateTable(Doctrine\DBAL\Connection $connection, string $tableName) {
|
||||
$sql = sprintf('TRUNCATE TABLE %s;', $tableName);
|
||||
$connection->query($sql);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue