From 6e57fd77afbf43cee5e030f64c7598be8a97916e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 8 Feb 2021 21:11:56 +0300 Subject: [PATCH] db: add type hints --- classes/db.php | 4 ++-- classes/pluginhost.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/db.php b/classes/db.php index 70b97d0ee..6199c82bb 100755 --- a/classes/db.php +++ b/classes/db.php @@ -92,7 +92,7 @@ class Db return self::$instance; } - public static function get() { + public static function get() : Db { if (self::$instance == null) self::$instance = new self(); @@ -103,7 +103,7 @@ class Db return self::$instance->adapter; } - public static function pdo() { + public static function pdo() : PDO { if (self::$instance == null) self::$instance = new self(); diff --git a/classes/pluginhost.php b/classes/pluginhost.php index d94279706..8c5e31ad3 100755 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -111,7 +111,7 @@ class PluginHost { return Db::get(); } - function get_pdo() { + function get_pdo(): PDO { return $this->pdo; }