mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-14 03:17:11 -04:00
Add PHPStan (#4021)
* Add PHPStan #fix https://github.com/FreshRSS/FreshRSS/issues/4016 https://phpstan.org/ ```sh composer run-script phpstan ``` * More fixes * Fix global variables * Add .phtml * Fix merge https://github.com/FreshRSS/FreshRSS/pull/4090 * Fix more warnings * Fix view errors and enable in CI * ReturnTypeWillChange * Dynamic view type * Fix Minz static/self bug
This commit is contained in:
committed by
GitHub
parent
09c84fb3bc
commit
77e9877316
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
$SQL_CREATE_DB = <<<'SQL'
|
||||
$GLOBALS['SQL_CREATE_DB'] = <<<'SQL'
|
||||
SELECT 1; -- Do nothing for SQLite
|
||||
SQL;
|
||||
|
||||
$SQL_CREATE_TABLES = <<<'SQL'
|
||||
$GLOBALS['SQL_CREATE_TABLES'] = <<<'SQL'
|
||||
CREATE TABLE IF NOT EXISTS `category` (
|
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
@@ -59,11 +59,11 @@ CREATE INDEX IF NOT EXISTS entry_feed_read_index ON `entry`(`id_feed`,`is_read`)
|
||||
INSERT OR IGNORE INTO `category` (id, name) VALUES(1, "Uncategorized");
|
||||
SQL;
|
||||
|
||||
$SQL_CREATE_INDEX_ENTRY_1 = <<<'SQL'
|
||||
$GLOBALS['SQL_CREATE_INDEX_ENTRY_1'] = <<<'SQL'
|
||||
CREATE INDEX IF NOT EXISTS entry_feed_read_index ON `entry`(`id_feed`,`is_read`); -- v1.7
|
||||
SQL;
|
||||
|
||||
$SQL_CREATE_TABLE_ENTRYTMP = <<<'SQL'
|
||||
$GLOBALS['SQL_CREATE_TABLE_ENTRYTMP'] = <<<'SQL'
|
||||
CREATE TABLE IF NOT EXISTS `entrytmp` ( -- v1.7
|
||||
`id` BIGINT NOT NULL,
|
||||
`guid` VARCHAR(760) NOT NULL,
|
||||
@@ -85,7 +85,7 @@ CREATE TABLE IF NOT EXISTS `entrytmp` ( -- v1.7
|
||||
CREATE INDEX IF NOT EXISTS entrytmp_date_index ON `entrytmp`(`date`);
|
||||
SQL;
|
||||
|
||||
$SQL_CREATE_TABLE_TAGS = <<<'SQL'
|
||||
$GLOBALS['SQL_CREATE_TABLE_TAGS'] = <<<'SQL'
|
||||
CREATE TABLE IF NOT EXISTS `tag` ( -- v1.12
|
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
`name` VARCHAR(63) NOT NULL,
|
||||
@@ -102,7 +102,7 @@ CREATE TABLE IF NOT EXISTS `entrytag` (
|
||||
CREATE INDEX IF NOT EXISTS entrytag_id_entry_index ON `entrytag` (`id_entry`);
|
||||
SQL;
|
||||
|
||||
$SQL_DROP_TABLES = <<<'SQL'
|
||||
$GLOBALS['SQL_DROP_TABLES'] = <<<'SQL'
|
||||
DROP TABLE IF EXISTS `entrytag`;
|
||||
DROP TABLE IF EXISTS `tag`;
|
||||
DROP TABLE IF EXISTS `entrytmp`;
|
||||
|
||||
Reference in New Issue
Block a user