mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-02-03 01:51:07 -05:00
* PHPStan level 6 for all PDO and Exception classes Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112 * Fix type * Now also our remaining own librairies * Motivation for a few more files * A few more DAO classes * Last interface
18 lines
454 B
PHP
18 lines
454 B
PHP
<?php
|
|
|
|
class FreshRSS_FeedDAOSQLite extends FreshRSS_FeedDAO {
|
|
|
|
/** @param array<string> $errorInfo */
|
|
protected function autoUpdateDb(array $errorInfo): bool {
|
|
if ($tableInfo = $this->pdo->query("PRAGMA table_info('feed')")) {
|
|
$columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1);
|
|
foreach (['attributes', 'kind'] as $column) {
|
|
if (!in_array($column, $columns)) {
|
|
return $this->addColumn($column);
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|