1
0
Fork 0
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:
Robin Appelman 2022-05-16 00:51:50 +02:00
commit 7de4c35ab4
34 changed files with 644 additions and 1048 deletions

View file

@ -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);
}