summaryrefslogtreecommitdiff
path: root/plugins/af_comics
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-11-14 20:33:37 +0300
committerAndrew Dolgov <[email protected]>2021-11-14 20:33:37 +0300
commitd17b79311e9c80576a8bf392b9d1dbee7fa8fbdc (patch)
tree1e05eb58232e036b1fdf6ecade7dea11444b7dcc /plugins/af_comics
parentafdb4b00729c8589e99e4ba27981450d1433d9b2 (diff)
set missing annotations in af_comics
Diffstat (limited to 'plugins/af_comics')
-rw-r--r--plugins/af_comics/filter_base.php18
-rw-r--r--plugins/af_comics/filters/af_comics_tfd.php2
2 files changed, 19 insertions, 1 deletions
diff --git a/plugins/af_comics/filter_base.php b/plugins/af_comics/filter_base.php
index 5c82bc870..83bc48184 100644
--- a/plugins/af_comics/filter_base.php
+++ b/plugins/af_comics/filter_base.php
@@ -1,20 +1,38 @@
<?php
abstract class Af_ComicFilter {
+ /** @return array<string> */
public abstract function supported();
+
+ /**
+ * @param array<string,mixed> $article
+ * @return bool
+ */
public abstract function process(&$article);
public function __construct(/*PluginHost $host*/) {
}
+ /**
+ * @param string $url
+ * @return string|false
+ */
public function on_subscribe($url) {
return false;
}
+ /**
+ * @param string $url
+ * @return array{"title": string, "site_url": string}|false
+ */
public function on_basic_info($url) {
return false;
}
+ /**
+ * @param string $url
+ * @return string|false
+ */
public function on_fetch($url) {
return false;
}
diff --git a/plugins/af_comics/filters/af_comics_tfd.php b/plugins/af_comics/filters/af_comics_tfd.php
index 19ca43a24..2010da37e 100644
--- a/plugins/af_comics/filters/af_comics_tfd.php
+++ b/plugins/af_comics/filters/af_comics_tfd.php
@@ -12,7 +12,7 @@ class Af_Comics_Tfd extends Af_ComicFilter {
false, false, 0,
"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)");
- if (!$res) return $article;
+ if (!$res) return false;
$doc = new DOMDocument();