set missing annotations in af_comics

This commit is contained in:
Andrew Dolgov 2021-11-14 20:33:37 +03:00
parent afdb4b0072
commit d17b79311e
2 changed files with 19 additions and 1 deletions

View File

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

View File

@ -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();