SpecialLinkSearch: clean up munged query variable handling
[lhc/web/wiklou.git] / includes / media / GIFMetadataExtractor.php
index f8f744b..178b0bf 100644 (file)
@@ -50,7 +50,7 @@ class GIFMetadataExtractor {
 
        /**
         * @throws Exception
-        * @param $filename string
+        * @param string $filename
         * @return array
         */
        static function getMetadata( $filename ) {
@@ -261,20 +261,21 @@ class GIFMetadataExtractor {
        }
 
        /**
-        * @param $fh
-        * @param $bpp
+        * @param resource $fh
+        * @param int $bpp
         * @return void
         */
        static function readGCT( $fh, $bpp ) {
                if ( $bpp > 0 ) {
-                       for ( $i = 1; $i <= pow( 2, $bpp ); ++$i ) {
+                       $max = pow( 2, $bpp );
+                       for ( $i = 1; $i <= $max; ++$i ) {
                                fread( $fh, 3 );
                        }
                }
        }
 
        /**
-        * @param $data
+        * @param string $data
         * @throws Exception
         * @return int
         */
@@ -293,7 +294,7 @@ class GIFMetadataExtractor {
        }
 
        /**
-        * @param $fh
+        * @param resource $fh
         * @throws Exception
         */
        static function skipBlock( $fh ) {
@@ -317,8 +318,8 @@ class GIFMetadataExtractor {
         * saying how long the sub-block is, followed by the sub-block.
         * The entire block is terminated by a sub-block of length
         * 0.
-        * @param $fh FileHandle
-        * @param $includeLengths Boolean Include the length bytes of the
+        * @param resource $fh File handle
+        * @param bool $includeLengths Include the length bytes of the
         *  sub-blocks in the returned value. Normally this is false,
         *  except XMP is weird and does a hack where you need to keep
         *  these length bytes.