summaryrefslogtreecommitdiff
path: root/classes/handler.php
diff options
context:
space:
mode:
authorwn_ <[email protected]>2021-11-13 14:05:43 +0000
committerwn_ <[email protected]>2021-11-13 14:05:48 +0000
commit1ec003ce352f5bf1418986d7b96c35e75231ffde (patch)
treeaec9ad492da61fa7d960bad96ad51472efb251df /classes/handler.php
parent25775bb4075e70aa4fad4620d077d4a0e59bb139 (diff)
Typing IHandler methods, typing Handler_Public, fix type of $feed_id (might be tag).
Diffstat (limited to 'classes/handler.php')
-rw-r--r--classes/handler.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/classes/handler.php b/classes/handler.php
index 4c79628db..3ee42cedb 100644
--- a/classes/handler.php
+++ b/classes/handler.php
@@ -1,9 +1,16 @@
<?php
class Handler implements IHandler {
+ // TODO: class properties can be switched to PHP typing if/when the minimum PHP_VERSION is raised to 7.4.0+
+ /** @var PDO */
protected $pdo;
+
+ /** @var array<int|string, mixed> */
protected $args;
- function __construct($args) {
+ /**
+ * @param array<int|string, mixed> $args
+ */
+ function __construct(array $args) {
$this->pdo = Db::pdo();
$this->args = $args;
}
@@ -12,11 +19,11 @@ class Handler implements IHandler {
return false;
}
- function before($method) {
+ function before(string $method): bool {
return true;
}
- function after() {
+ function after(): bool {
return true;
}