diff options
author | Andrew Dolgov <[email protected]> | 2017-04-26 20:57:36 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-04-26 20:57:36 +0300 |
commit | 21ce7d9ec02b0bf7c6e0ac7c28bc7c1bb0a841c5 (patch) | |
tree | 2a784cf4c91abe828b42e79a886c2cc0f80df5e2 /plugins/af_comics/filters/af_comics_pa.php | |
parent | ea79a0e033e40057279a7f464c9464145eedc932 (diff) |
update phpmd ruleset to use (subset) of cleancode
fix various minor issues reported by static analysis
remove redundant php closing tag from several more files
Diffstat (limited to 'plugins/af_comics/filters/af_comics_pa.php')
-rw-r--r-- | plugins/af_comics/filters/af_comics_pa.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/plugins/af_comics/filters/af_comics_pa.php b/plugins/af_comics/filters/af_comics_pa.php index 0848adbd0..ae5cabec0 100644 --- a/plugins/af_comics/filters/af_comics_pa.php +++ b/plugins/af_comics/filters/af_comics_pa.php @@ -8,16 +8,13 @@ class Af_Comics_Pa extends Af_ComicFilter { function process(&$article) { if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { - if ($debug_enabled) { + /*if ($debug_enabled) { _debug("af_pennyarcade: Processing comic"); - } + }*/ $doc = new DOMDocument(); - $doc->loadHTML(fetch_file_contents($article["link"])); - - $basenode = false; - if ($doc) { + if ($doc->loadHTML(fetch_file_contents($article["link"]))) { $xpath = new DOMXPath($doc); $basenode = $xpath->query('(//div[@id="comicFrame"])')->item(0); @@ -30,13 +27,12 @@ class Af_Comics_Pa extends Af_ComicFilter { } if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "News Post:") !== FALSE) { - if ($debug_enabled) { + /*if ($debug_enabled) { _debug("af_pennyarcade: Processing news post"); - } + }*/ $doc = new DOMDocument(); - $doc->loadHTML(fetch_file_contents($article["link"])); - if ($doc) { + if ($doc->loadHTML(fetch_file_contents($article["link"]))) { $xpath = new DOMXPath($doc); $entries = $xpath->query('(//div[@class="post"])'); @@ -75,5 +71,4 @@ class Af_Comics_Pa extends Af_ComicFilter { return false; } -} -?> +}
\ No newline at end of file |