mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-26 22:27:58 -05:00
* - Fix typo, - remove unnecessary null in property, - remove unused property, - add phpDoc, - add ext PDO in composer.json, - use strict comparison, - indentation * Translate * Update lib/Minz/ModelPdo.php Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * The code is more explicite * Fix phpstan * Fix phpstan expect one * Fix phpstan * Return in back... * make fix-all * Fix exception and more types * Fix more types * Remove ext- in composer.json Co-authored-by: Luc SANCHEZ <l.sanchez-ext@ubitransport.com> Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
24 lines
635 B
PHP
24 lines
635 B
PHP
<?php
|
|
|
|
/**
|
|
* MINZ - Copyright 2011 Marien Fressinaud
|
|
* Sous licence AGPL3 <http://www.gnu.org/licenses/>
|
|
*/
|
|
|
|
class Minz_PdoSqlite extends Minz_Pdo {
|
|
public function __construct(string $dsn, $username = null, $passwd = null, $options = null) {
|
|
parent::__construct($dsn, $username, $passwd, $options);
|
|
$this->exec('PRAGMA foreign_keys = ON;');
|
|
}
|
|
|
|
public function dbType(): string {
|
|
return 'sqlite';
|
|
}
|
|
|
|
// PHP8+: PDO::lastInsertId(?string $name = null): string|false
|
|
#[\ReturnTypeWillChange]
|
|
public function lastInsertId($name = null) {
|
|
return parent::lastInsertId(); //We discard the name, only used by PostgreSQL
|
|
}
|
|
}
|