mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-28 15:11:07 -05:00
* Minor update whitespace PHPCS rules To simplify our configuration, apply more rules, and be clearer about what is added or removed compared with PSR12. Does not change our current conventions, but just a bit more consistent. * Forgotten *.phtml * Sort exclusion patterns + add a few for Extensions repo * Relaxed some rules
20 lines
538 B
PHP
20 lines
538 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
class FreshRSS_CategoryDAOSQLite extends FreshRSS_CategoryDAO {
|
|
|
|
/** @param array<int|string> $errorInfo */
|
|
#[\Override]
|
|
protected function autoUpdateDb(array $errorInfo): bool {
|
|
if ($tableInfo = $this->pdo->query("PRAGMA table_info('category')")) {
|
|
$columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1);
|
|
foreach (['kind', 'lastUpdate', 'error', 'attributes'] as $column) {
|
|
if (!in_array($column, $columns, true)) {
|
|
return $this->addColumn($column);
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|