From 53054b2bf6a919fd4ff9b44b6ad1986f21f488b6 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 22 Sep 2020 20:25:47 +0200 Subject: Apply PHP Code Beautifier on source code for linter automatic fixes --- application/Thumbnailer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'application/Thumbnailer.php') diff --git a/application/Thumbnailer.php b/application/Thumbnailer.php index 5aec23c8..30354310 100644 --- a/application/Thumbnailer.php +++ b/application/Thumbnailer.php @@ -60,7 +60,7 @@ class Thumbnailer // TODO: create a proper error handling system able to catch exceptions... die(t( 'php-gd extension must be loaded to use thumbnails. ' - .'Thumbnails are now disabled. Please reload the page.' + . 'Thumbnails are now disabled. Please reload the page.' )); } @@ -81,7 +81,8 @@ class Thumbnailer */ public function get($url) { - if ($this->conf->get('thumbnails.mode') === self::MODE_COMMON + if ( + $this->conf->get('thumbnails.mode') === self::MODE_COMMON && ! $this->isCommonMediaOrImage($url) ) { return false; -- cgit v1.2.3 From b99e00f7cd5f7e2090f44cd97bfb426db55340c2 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 8 Nov 2020 15:02:45 +0100 Subject: Manually fix remaining PHPCS errors --- application/Thumbnailer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'application/Thumbnailer.php') diff --git a/application/Thumbnailer.php b/application/Thumbnailer.php index 30354310..c4ff8d7a 100644 --- a/application/Thumbnailer.php +++ b/application/Thumbnailer.php @@ -13,7 +13,7 @@ use WebThumbnailer\WebThumbnailer; */ class Thumbnailer { - const COMMON_MEDIA_DOMAINS = [ + protected const COMMON_MEDIA_DOMAINS = [ 'imgur.com', 'flickr.com', 'youtube.com', @@ -31,9 +31,9 @@ class Thumbnailer 'deviantart.com', ]; - const MODE_ALL = 'all'; - const MODE_COMMON = 'common'; - const MODE_NONE = 'none'; + public const MODE_ALL = 'all'; + public const MODE_COMMON = 'common'; + public const MODE_NONE = 'none'; /** * @var WebThumbnailer instance. -- cgit v1.2.3