minor phpstan tweaks
This commit is contained in:
parent
3b70d1f622
commit
9f734c9050
|
@ -307,6 +307,7 @@ class API extends Handler {
|
|||
$article_ids = explode(',', clean($_REQUEST['article_id'] ?? ''));
|
||||
$sanitize_content = self::_param_to_bool($_REQUEST['sanitize'] ?? true);
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
if (count($article_ids)) {
|
||||
$entries = ORM::for_table('ttrss_entries')
|
||||
->table_alias('e')
|
||||
|
@ -369,7 +370,6 @@ class API extends Handler {
|
|||
}
|
||||
|
||||
$this->_wrap(self::STATUS_OK, $articles);
|
||||
// @phpstan-ignore-next-line
|
||||
} else {
|
||||
$this->_wrap(self::STATUS_ERR, ['error' => self::E_INCORRECT_USAGE]);
|
||||
}
|
||||
|
|
|
@ -190,6 +190,7 @@ abstract class FeedItem_Common extends FeedItem {
|
|||
}, $tmp);
|
||||
|
||||
// remove empty values
|
||||
// @phpstan-ignore-next-line
|
||||
$tmp = array_filter($tmp, 'strlen');
|
||||
|
||||
asort($tmp);
|
||||
|
|
|
@ -53,6 +53,10 @@ class Handler_Public extends Handler {
|
|||
|
||||
if ($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);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
parameters:
|
||||
level: 5
|
||||
ignoreErrors:
|
||||
# - '#Constant.*not found#'
|
||||
- '#Constant.*\b(SUBSTRING_FOR_DATE|SCHEMA_VERSION|SELF_USER_AGENT|LABEL_BASE_INDEX|PLUGIN_FEED_BASE_INDEX)\b.*not found#'
|
||||
- '#Comparison operation ">" between int<1, max> and 0 is always true.#'
|
||||
- '#Access to an undefined property DOMNode::\$tagName.#'
|
||||
|
|
|
@ -285,7 +285,6 @@ class InstalledVersions
|
|||
$installed = array();
|
||||
|
||||
if (self::$canGetVendors) {
|
||||
// @phpstan-ignore-next-line
|
||||
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
||||
if (isset(self::$installedByVendor[$vendorDir])) {
|
||||
$installed[] = self::$installedByVendor[$vendorDir];
|
||||
|
|
Loading…
Reference in New Issue