From 6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 11 May 2023 13:02:04 +0200 Subject: A few additional PHPStan rules (#5388) A subset of https://github.com/phpstan/phpstan-strict-rules --- app/Models/DatabaseDAOSQLite.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/Models/DatabaseDAOSQLite.php') 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 $dao - * @return array + * @param array $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'], ]; } -- cgit v1.2.3