1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-28 08:07:17 +00:00

Typing IHandler methods, typing Handler_Public, fix type of $feed_id (might be tag).

This commit is contained in:
wn_
2021-11-13 14:05:43 +00:00
parent 25775bb407
commit 1ec003ce35
7 changed files with 49 additions and 28 deletions

View File

@@ -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;
}