mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-02-07 03:51:04 -05:00
* PHPStan Level 7 for more DAO PDO With new function to address common type and check problems * A bit more * PHPStan Level 7 for FreshRSS_Entry
28 lines
713 B
PHP
28 lines
713 B
PHP
<?php
|
|
|
|
/**
|
|
* MINZ - Copyright 2011 Marien Fressinaud
|
|
* Sous licence AGPL3 <http://www.gnu.org/licenses/>
|
|
*/
|
|
|
|
class Minz_PdoSqlite extends Minz_Pdo {
|
|
/** @param array<int,int|string|bool>|null $options */
|
|
public function __construct(string $dsn, ?string $username = null, ?string $passwd = null, ?array $options = null) {
|
|
parent::__construct($dsn, $username, $passwd, $options);
|
|
$this->exec('PRAGMA foreign_keys = ON;');
|
|
}
|
|
|
|
public function dbType(): string {
|
|
return 'sqlite';
|
|
}
|
|
|
|
/**
|
|
* @param string|null $name
|
|
* @return string|false
|
|
*/
|
|
#[\ReturnTypeWillChange]
|
|
public function lastInsertId($name = null) {
|
|
return parent::lastInsertId(); //We discard the name, only used by PostgreSQL
|
|
}
|
|
}
|