Merge "Follow-up 42333412833a - Fix behaviour $wgVerifyMimeType = false;"
[lhc/web/wiklou.git] / includes / media / IPTC.php
index 3b99fba..544dd21 100644 (file)
@@ -35,7 +35,7 @@ class IPTC {
         *
         * @see http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf
         *
-        * @param $rawData String app13 block from jpeg containing iptc/iim data
+        * @param string $rawData app13 block from jpeg containing iptc/iim data
         * @return Array iptc metadata array
         */
        static function parse( $rawData ) {
@@ -63,7 +63,7 @@ class IPTC {
                                wfDebugLog( 'iptc', "IPTC tag $tag had only whitespace as its value." );
                                continue;
                        }
-                       switch( $tag ) {
+                       switch ( $tag ) {
                                case '2#120': /*IPTC caption. mapped with exif ImageDescription*/
                                        $data['ImageDescription'] = self::convIPTC( $val, $c );
                                        break;
@@ -353,8 +353,8 @@ class IPTC {
         * Convert an iptc date and time tags into the exif format
         *
         * @todo Potentially this should also capture the timezone offset.
-        * @param Array $date The date tag
-        * @param Array $time The time tag
+        * @param array $date The date tag
+        * @param array $time The time tag
         * @param $c
         * @return String Date in exif format.
         */
@@ -396,7 +396,7 @@ class IPTC {
                        return null;
                }
 
-               $tz = ( intval( substr( $time, 7, 2 ) ) *60*60 )
+               $tz = ( intval( substr( $time, 7, 2 ) ) * 60 * 60 )
                        + ( intval( substr( $time, 9, 2 ) ) * 60 );
 
                if ( substr( $time, 6, 1 ) === '-' ) {
@@ -418,12 +418,12 @@ class IPTC {
 
        /**
         * Helper function to convert charset for iptc values.
-        * @param $data string|array The iptc string
-        * @param $charset String: The charset
+        * @param string|array $data The iptc string
+        * @param string $charset The charset
         *
         * @return string|array
         */
-       private static function convIPTC ( $data, $charset ) {
+       private static function convIPTC( $data, $charset ) {
                if ( is_array( $data ) ) {
                        foreach ( $data as &$val ) {
                                $val = self::convIPTCHelper( $val, $charset );
@@ -437,11 +437,11 @@ class IPTC {
        /**
         * Helper function of a helper function to convert charset for iptc values.
         * @param $data Mixed String or Array: The iptc string
-        * @param $charset String: The charset
+        * @param string $charset The charset
         *
         * @return string
         */
-       private static function convIPTCHelper ( $data, $charset ) {
+       private static function convIPTCHelper( $data, $charset ) {
                if ( $charset ) {
                        wfSuppressWarnings();
                        $data = iconv( $charset, "UTF-8//IGNORE", $data );
@@ -466,7 +466,7 @@ class IPTC {
 
        /**
         * take the value of 1:90 tag and returns a charset
-        * @param String $tag 1:90 tag.
+        * @param string $tag 1:90 tag.
         * @return string charset name or "?"
         * Warning, this function does not (and is not intended to) detect
         * all iso 2022 escape codes. In practise, the code for utf-8 is the