diff options
author | Andrew Dolgov <[email protected]> | 2021-11-18 07:32:28 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-11-18 07:32:28 +0300 |
commit | 63ec5a89657bb7f9650582b96e0bb255a0889b48 (patch) | |
tree | 074b61eedd7304ba1d8d7deec01d26973ef8e6b8 /classes/handler.php | |
parent | 3a3fde1a2e0beac6d179c6449eaad726100710d7 (diff) | |
parent | 2d830c6281c19a7ee29cd379f5aedc82deef3775 (diff) |
Merge branch 'wip-phpstan-level6'
Diffstat (limited to 'classes/handler.php')
-rw-r--r-- | classes/handler.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/classes/handler.php b/classes/handler.php index 09557c284..3ee42cedb 100644 --- a/classes/handler.php +++ b/classes/handler.php @@ -1,22 +1,29 @@ <?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; } - function csrf_ignore($method) { + function csrf_ignore(string $method): bool { return false; } - function before($method) { + function before(string $method): bool { return true; } - function after() { + function after(): bool { return true; } |