Merge "StatusTest is language dependant"
[lhc/web/wiklou.git] / includes / media / PNG.php
index d2c17ef..968db10 100644 (file)
@@ -27,7 +27,6 @@
  * @ingroup Media
  */
 class PNGHandler extends BitmapHandler {
-
        const BROKEN_FILE = '0';
 
        /**
@@ -41,6 +40,7 @@ class PNGHandler extends BitmapHandler {
                } catch ( Exception $e ) {
                        // Broken file?
                        wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
+
                        return self::BROKEN_FILE;
                }
 
@@ -48,7 +48,7 @@ class PNGHandler extends BitmapHandler {
        }
 
        /**
-        * @param $image File
+        * @param File $image
         * @return array|bool
         */
        function formatMetadata( $image ) {
@@ -63,7 +63,7 @@ class PNGHandler extends BitmapHandler {
        /**
         * Get a file type independent array of metadata.
         *
-        * @param $image File
+        * @param File $image
         * @return array The metadata array
         */
        public function getCommonMetaArray( File $image ) {
@@ -77,11 +77,12 @@ class PNGHandler extends BitmapHandler {
                        return array();
                }
                unset( $meta['metadata']['_MW_PNG_VERSION'] );
+
                return $meta['metadata'];
        }
 
        /**
-        * @param $image File
+        * @param File $image
         * @return bool
         */
        function isAnimatedImage( $image ) {
@@ -92,11 +93,13 @@ class PNGHandler extends BitmapHandler {
                                return true;
                        }
                }
+
                return false;
        }
+
        /**
         * We do not support making APNG thumbnails, so always false
-        * @param $image File
+        * @param File $image
         * @return bool false
         */
        function canAnimateThumbnail( $image ) {
@@ -120,19 +123,23 @@ class PNGHandler extends BitmapHandler {
 
                if ( !$data || !is_array( $data ) ) {
                        wfDebug( __METHOD__ . " invalid png metadata\n" );
+
                        return self::METADATA_BAD;
                }
 
                if ( !isset( $data['metadata']['_MW_PNG_VERSION'] )
-                       || $data['metadata']['_MW_PNG_VERSION'] != PNGMetadataExtractor::VERSION ) {
+                       || $data['metadata']['_MW_PNG_VERSION'] != PNGMetadataExtractor::VERSION
+               ) {
                        wfDebug( __METHOD__ . " old but compatible png metadata\n" );
+
                        return self::METADATA_COMPATIBLE;
                }
+
                return self::METADATA_GOOD;
        }
 
        /**
-        * @param $image File
+        * @param File $image
         * @return string
         */
        function getLongDesc( $image ) {
@@ -166,5 +173,4 @@ class PNGHandler extends BitmapHandler {
 
                return $wgLang->commaList( $info );
        }
-
 }