update phpstan to 1.8.2
This commit is contained in:
@@ -43,7 +43,8 @@ class FeedItem_Atom extends FeedItem_Common {
|
||||
$links = $this->elem->getElementsByTagName("link");
|
||||
|
||||
foreach ($links as $link) {
|
||||
if ($link && $link->hasAttribute("href") &&
|
||||
/** @phpstan-ignore-next-line */
|
||||
if ($link->hasAttribute("href") &&
|
||||
(!$link->hasAttribute("rel")
|
||||
|| $link->getAttribute("rel") == "alternate"
|
||||
|| $link->getAttribute("rel") == "standout")) {
|
||||
@@ -180,7 +181,8 @@ class FeedItem_Atom extends FeedItem_Common {
|
||||
$encs = [];
|
||||
|
||||
foreach ($links as $link) {
|
||||
if ($link && $link->hasAttribute("href") && $link->hasAttribute("rel")) {
|
||||
/** @phpstan-ignore-next-line */
|
||||
if ($link->hasAttribute("href") && $link->hasAttribute("rel")) {
|
||||
$base = $this->xpath->evaluate("string(ancestor-or-self::*[@xml:base][1]/@xml:base)", $link);
|
||||
|
||||
if ($link->getAttribute("rel") == "enclosure") {
|
||||
|
||||
@@ -248,11 +248,12 @@ class Feeds extends Handler_Protected {
|
||||
function ($result, $plugin) use (&$line, &$button_doc) {
|
||||
if ($result && $button_doc->loadXML($result)) {
|
||||
|
||||
/** @var DOMElement|null */
|
||||
/** @var DOMElement|null $child */
|
||||
$child = $button_doc->firstChild;
|
||||
|
||||
if ($child) {
|
||||
do {
|
||||
/** @var DOMElement|null $child */
|
||||
$child->setAttribute('data-plugin-name', get_class($plugin));
|
||||
} while ($child = $child->nextSibling);
|
||||
|
||||
@@ -271,11 +272,12 @@ class Feeds extends Handler_Protected {
|
||||
function ($result, $plugin) use (&$line, &$button_doc) {
|
||||
if ($result && $button_doc->loadXML($result)) {
|
||||
|
||||
/** @var DOMElement|null */
|
||||
/** @var DOMElement|null $child */
|
||||
$child = $button_doc->firstChild;
|
||||
|
||||
if ($child) {
|
||||
do {
|
||||
/** @var DOMElement|null $child */
|
||||
$child->setAttribute('data-plugin-name', get_class($plugin));
|
||||
} while ($child = $child->nextSibling);
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ class Pref_Filters extends Handler_Protected {
|
||||
$glue = $filter['match_any_rule'] ? " OR " : " AND ";
|
||||
$scope_qpart = join($glue, $scope_qparts);
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
if (!$scope_qpart) $scope_qpart = "true";
|
||||
|
||||
$rv = array();
|
||||
|
||||
@@ -662,7 +662,7 @@ class RSSUtils {
|
||||
print_r($item);
|
||||
}
|
||||
|
||||
if (ini_get("max_execution_time") > 0 && time() - $tstart >= ini_get("max_execution_time") * 0.7) {
|
||||
if (ini_get("max_execution_time") > 0 && time() - $tstart >= ((float)ini_get("max_execution_time") * 0.7)) {
|
||||
Debug::log("looks like there's too many articles to process at once, breaking out.", Debug::LOG_VERBOSE);
|
||||
$pdo->commit();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user