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/cache_starred_images/init.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/cache_starred_images/init.php')
-rw-r--r-- | plugins/cache_starred_images/init.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php index de627fc77..6c9e67b17 100644 --- a/plugins/cache_starred_images/init.php +++ b/plugins/cache_starred_images/init.php @@ -11,10 +11,16 @@ class Cache_Starred_Images extends Plugin implements IHandler { true); } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ function csrf_ignore($method) { return false; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ function before($method) { return true; } @@ -88,6 +94,9 @@ class Cache_Starred_Images extends Plugin implements IHandler { } } + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ function hook_house_keeping() { $files = glob($this->cache_dir . "/*.{png,mp4}", GLOB_BRACE); @@ -112,6 +121,9 @@ class Cache_Starred_Images extends Plugin implements IHandler { } } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes, $article_id) { $xpath = new DOMXpath($doc); @@ -162,6 +174,9 @@ class Cache_Starred_Images extends Plugin implements IHandler { } } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ function cache_article_images($content, $site_url, $owner_uid, $article_id) { libxml_use_internal_errors(true); @@ -211,4 +226,3 @@ class Cache_Starred_Images extends Plugin implements IHandler { return 2; } } -?> |