Merge "Allow message object on HTMLForm::setWrapperLegendMsg/setSubmitTextMsg"
[lhc/web/wiklou.git] / includes / media / JpegMetadataExtractor.php
index 7763c6f..8c5b46b 100644 (file)
@@ -43,9 +43,9 @@ class JpegMetadataExtractor {
         * but gis doesn't support having multiple app1 segments
         * and those can't extract xmp on files containing both exif and xmp data
         *
-        * @param string $filename name of jpeg file
-        * @return Array of interesting segments.
-        * @throws MWException if given invalid file.
+        * @param string $filename Name of jpeg file
+        * @return array Array of interesting segments.
+        * @throws MWException If given invalid file.
         */
        static function segmentSplitter( $filename ) {
                $showXMP = function_exists( 'xml_parser_create_ns' );
@@ -83,7 +83,8 @@ class JpegMetadataExtractor {
                                throw new MWException( 'Too many jpeg segments. Aborting' );
                        }
                        if ( $buffer !== "\xFF" ) {
-                               throw new MWException( "Error reading jpeg file marker. Expected 0xFF but got " . bin2hex( $buffer ) );
+                               throw new MWException( "Error reading jpeg file marker. " .
+                                       "Expected 0xFF but got " . bin2hex( $buffer ) );
                        }
 
                        $buffer = fread( $fh, 1 );
@@ -166,9 +167,9 @@ class JpegMetadataExtractor {
 
        /**
         * Helper function for jpegSegmentSplitter
-        * @param &$fh FileHandle for jpeg file
+        * @param resource &$fh File handle for JPEG file
         * @throws MWException
-        * @return string data content of segment.
+        * @return string Data content of segment.
         */
        private static function jpegExtractMarker( &$fh ) {
                $size = wfUnpack( "nint", fread( $fh, 2 ), 2 );
@@ -192,9 +193,10 @@ class JpegMetadataExtractor {
         *
         * This should generally be called by BitmapMetadataHandler::doApp13()
         *
-        * @param string $app13 photoshop psir app13 block from jpg.
+        * @param string $app13 Photoshop psir app13 block from jpg.
         * @throws MWException (It gets caught next level up though)
-        * @return String if the iptc hash is good or not.
+        * @return string If the iptc hash is good or not. One of 'iptc-no-hash',
+        *   'iptc-good-hash', 'iptc-bad-hash'.
         */
        public static function doPSIR( $app13 ) {
                if ( !$app13 ) {