From 97380b2bee462d4e88a72f4c490cc8ccb31ea6dc Mon Sep 17 00:00:00 2001 From: kj Date: Tue, 22 Mar 2022 04:30:47 -0400 Subject: [PATCH] Change ModelMySQL atributes to strong typed. --- src/Libs/ModelMySQL.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Libs/ModelMySQL.php b/src/Libs/ModelMySQL.php index 3696569..87c683e 100644 --- a/src/Libs/ModelMySQL.php +++ b/src/Libs/ModelMySQL.php @@ -17,16 +17,15 @@ use mysqli; class ModelMySQL { - public $id; - protected $toNull = []; - - static protected $primaryKey = 'id'; - static protected $ignoreSave = ['id']; - static protected $forceSave = []; - static protected $table; - static protected $tableSufix = 's'; - static protected $db; - static protected $querySelect = [ + public int $id; + protected array $toNull = []; + static protected string $primaryKey = 'id'; + static protected array $ignoreSave = ['id']; + static protected array $forceSave = []; + static protected string $table; + static protected string $tableSufix = 's'; + static protected ?mysqli $db = null; + static protected array $querySelect = [ 'select' => ['*'], 'where' => '', 'from' => '',