From 5606e38bff619c388c9621dde30f0d54127a21f4 Mon Sep 17 00:00:00 2001 From: wn_ Date: Fri, 12 Nov 2021 02:01:31 +0000 Subject: Update signature of handler 'csrf_ignore' to include types. --- classes/handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/handler.php') diff --git a/classes/handler.php b/classes/handler.php index 09557c284..4c79628db 100644 --- a/classes/handler.php +++ b/classes/handler.php @@ -8,7 +8,7 @@ class Handler implements IHandler { $this->args = $args; } - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { return false; } -- cgit v1.2.3 From 1ec003ce352f5bf1418986d7b96c35e75231ffde Mon Sep 17 00:00:00 2001 From: wn_ Date: Sat, 13 Nov 2021 14:05:43 +0000 Subject: Typing IHandler methods, typing Handler_Public, fix type of $feed_id (might be tag). --- classes/handler.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'classes/handler.php') 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 @@ */ protected $args; - function __construct($args) { + /** + * @param array $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; } -- cgit v1.2.3