Remove some PHPStan ignores and make others rule-specific.

This commit is contained in:
wn_
2024-11-12 03:38:45 +00:00
parent a784305cc7
commit dca2ae60a1
9 changed files with 8 additions and 16 deletions

View File

@@ -53,9 +53,8 @@ class Handler_Public extends Handler {
$handler = $tmppluginhost->get_feed_handler(
PluginHost::feed_to_pfeed_id((int)$feed));
if ($handler) {
// 'get_headlines' is implemented by the plugin.
// @phpstan-ignore-next-line
if ($handler && implements_interface($handler, 'IVirtualFeed')) {
/** @var Plugin&IVirtualFeed $handler */
$qfh_ret = $handler->get_headlines(PluginHost::feed_to_pfeed_id((int)$feed), $params);
} else {
user_error("Failed to find handler for plugin feed ID: $feed", E_USER_ERROR);