aboutsummaryrefslogtreecommitdiff
path: root/app/Models/DatabaseDAOSQLite.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-05-11 13:02:04 +0200
committerGravatar GitHub <noreply@github.com> 2023-05-11 13:02:04 +0200
commit6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 (patch)
tree7ba9f5aebb01d12045b9067a86b5060ba13dca18 /app/Models/DatabaseDAOSQLite.php
parentfe7d9bbcd68660a59b813346c236b61b25a51c80 (diff)
A few additional PHPStan rules (#5388)
A subset of https://github.com/phpstan/phpstan-strict-rules
Diffstat (limited to 'app/Models/DatabaseDAOSQLite.php')
-rw-r--r--app/Models/DatabaseDAOSQLite.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Models/DatabaseDAOSQLite.php b/app/Models/DatabaseDAOSQLite.php
index 8bd8d60ed..5168f5e19 100644
--- a/app/Models/DatabaseDAOSQLite.php
+++ b/app/Models/DatabaseDAOSQLite.php
@@ -50,14 +50,14 @@ class FreshRSS_DatabaseDAOSQLite extends FreshRSS_DatabaseDAO {
}
/**
- * @param array<string,string> $dao
- * @return array<string,string|bool>
+ * @param array<string,string|int|bool|null> $dao
+ * @return array{'name':string,'type':string,'notnull':bool,'default':mixed}
*/
public function daoToSchema(array $dao): array {
return [
- 'name' => $dao['name'],
- 'type' => strtolower($dao['type']),
- 'notnull' => $dao['notnull'] === '1' ? true : false,
+ 'name' => (string)$dao['name'],
+ 'type' => strtolower((string)$dao['type']),
+ 'notnull' => $dao['notnull'] == '1' ? true : false,
'default' => $dao['dflt_value'],
];
}