From 016d012dbfd809cbea628c295182f085f583f14a Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 28 Sep 2015 13:50:29 +0200 Subject: [PATCH] Fix PHPCS warnings in /includes/media/ Change-Id: I9b551dd7b9f4e8a11f86a1acf2c7241f02d85515 --- includes/media/Bitmap.php | 1 - includes/media/XCF.php | 32 +++++++++++++++++--------------- includes/media/XMP.php | 8 +++----- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 0b5b8b6205..692e5a644f 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -299,7 +299,6 @@ class BitmapHandler extends TransformationalImageHandler { */ protected function transformGd( $image, $params ) { # Use PHP's builtin GD library functions. - # # First find out what kind of file this is, and select the correct # input routine for this. diff --git a/includes/media/XCF.php b/includes/media/XCF.php index 16e11dc401..41e1d54b6b 100644 --- a/includes/media/XCF.php +++ b/includes/media/XCF.php @@ -106,21 +106,23 @@ class XCFHandler extends BitmapHandler { $binaryHeader = fread( $f, 26 ); fclose( $f ); - # Master image structure: - # - # byte[9] "gimp xcf " File type magic - # byte[4] version XCF version - # "file" - version 0 - # "v001" - version 1 - # "v002" - version 2 - # byte 0 Zero-terminator for version tag - # uint32 width With of canvas - # uint32 height Height of canvas - # uint32 base_type Color mode of the image; one of - # 0: RGB color - # 1: Grayscale - # 2: Indexed color - # (enum GimpImageBaseType in libgimpbase/gimpbaseenums.h) + /** + * Master image structure: + * + * byte[9] "gimp xcf " File type magic + * byte[4] version XCF version + * "file" - version 0 + * "v001" - version 1 + * "v002" - version 2 + * byte 0 Zero-terminator for version tag + * uint32 width With of canvas + * uint32 height Height of canvas + * uint32 base_type Color mode of the image; one of + * 0: RGB color + * 1: Grayscale + * 2: Indexed color + * (enum GimpImageBaseType in libgimpbase/gimpbaseenums.h) + */ try { $header = wfUnpack( "A9magic" . # A: space padded diff --git a/includes/media/XMP.php b/includes/media/XMP.php index 06311834ea..fb840c245d 100644 --- a/includes/media/XMP.php +++ b/includes/media/XMP.php @@ -447,9 +447,8 @@ class XMPReader implements LoggerAwareInterface { // immediately following the StandardXMP. However, the JPEG standard // does not require preservation of marker segment order. A robust JPEG // reader should tolerate the marker segments in any order." - // - // otoh the probability that an image will have more than 128k of - // metadata is rather low... so the probability that it will have + // On the other hand, the probability that an image will have more than + // 128k of metadata is rather low... so the probability that it will have // > 128k, and be in the wrong order is very low... if ( $len['offset'] !== $this->extendedXMPOffset ) { @@ -1213,8 +1212,7 @@ class XMPReader implements LoggerAwareInterface { // In practise I have yet to see a file that // uses this element, however it is mentioned // on page 25 of part 1 of the xmp standard. - // - // also it seems as if exiv2 and exiftool do not support + // Also it seems as if exiv2 and exiftool do not support // this either (That or I misunderstand the standard) $this->logger->info( __METHOD__ . ' Encountered which isn\'t currently supported' ); } -- 2.20.1