aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/PdoMysql.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-03-31 08:23:39 +0200
committerGravatar GitHub <noreply@github.com> 2023-03-31 08:23:39 +0200
commit288ed04ccc30b58373576dc3be811aee43e67034 (patch)
tree27f4c571e04d64c97737416dfa2b8d65f481dfd8 /lib/Minz/PdoMysql.php
parentc9d5fe2da12cbc3a071ebf9a518afe2789bb3d61 (diff)
PHPStan level 6 for all PDO and Exception classes (#5239)
* 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
Diffstat (limited to 'lib/Minz/PdoMysql.php')
-rw-r--r--lib/Minz/PdoMysql.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Minz/PdoMysql.php b/lib/Minz/PdoMysql.php
index b66cccf28..ee411d949 100644
--- a/lib/Minz/PdoMysql.php
+++ b/lib/Minz/PdoMysql.php
@@ -6,7 +6,8 @@
*/
class Minz_PdoMysql extends Minz_Pdo {
- public function __construct(string $dsn, $username = null, $passwd = null, $options = null) {
+ /** @param array<int,int|string>|null $options */
+ public function __construct(string $dsn, ?string $username = null, ?string $passwd = null, ?array $options = null) {
parent::__construct($dsn, $username, $passwd, $options);
$this->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
}
@@ -15,7 +16,10 @@ class Minz_PdoMysql extends Minz_Pdo {
return 'mysql';
}
- // PHP8+: PDO::lastInsertId(?string $name = null): string|false
+ /**
+ * @param string|null $name
+ * @return string|false
+ */
#[\ReturnTypeWillChange]
public function lastInsertId($name = null) {
return parent::lastInsertId(); //We discard the name, only used by PostgreSQL