Fix PHPCS warnings in /includes/media/
authorSiebrand Mazeland <siebrand@kitano.nl>
Mon, 28 Sep 2015 11:50:29 +0000 (13:50 +0200)
committerSiebrand Mazeland <siebrand@kitano.nl>
Mon, 28 Sep 2015 11:50:44 +0000 (13:50 +0200)
Change-Id: I9b551dd7b9f4e8a11f86a1acf2c7241f02d85515

includes/media/Bitmap.php
includes/media/XCF.php
includes/media/XMP.php

index 0b5b8b6..692e5a6 100644 (file)
@@ -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.
 
index 16e11dc..41e1d54 100644 (file)
@@ -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
index 0631183..fb840c2 100644 (file)
@@ -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 <rdf:type> which isn\'t currently supported' );
                }