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 <?php
abstract class Af_ComicFilter { abstract class Af_ComicFilter {
/** @return array<string> */
public abstract function supported(); public abstract function supported();
/**
* @param array<string,mixed> $article
* @return bool
*/
public abstract function process(&$article); public abstract function process(&$article);
public function __construct(/*PluginHost $host*/) { public function __construct(/*PluginHost $host*/) {
} }
/**
* @param string $url
* @return string|false
*/
public function on_subscribe($url) { public function on_subscribe($url) {
return false; return false;
} }
/**
* @param string $url
* @return array{"title": string, "site_url": string}|false
*/
public function on_basic_info($url) { public function on_basic_info($url) {
return false; return false;
} }
/**
* @param string $url
* @return string|false
*/
public function on_fetch($url) { public function on_fetch($url) {
return false; return false;
} }

View File

@ -12,7 +12,7 @@ class Af_Comics_Tfd extends Af_ComicFilter {
false, false, 0, false, false, 0,
"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.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(); $doc = new DOMDocument();