Merge "Move log log_page entries are now that of the moved page"
[lhc/web/wiklou.git] / includes / media / IPTC.php
index 4b228b4..478249f 100644 (file)
@@ -34,8 +34,8 @@ class IPTC {
         *
         * @see http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf
         *
-        * @param string $rawData app13 block from jpeg containing iptc/iim data
-        * @return Array iptc metadata array
+        * @param string $rawData The app13 block from jpeg containing iptc/iim data
+        * @return array IPTC metadata array
         */
        static function parse( $rawData ) {
                $parsed = iptcparse( $rawData );
@@ -84,7 +84,8 @@ class IPTC {
                                                $titles = array();
                                        }
 
-                                       for ( $i = 0; $i < count( $titles ); $i++ ) {
+                                       $titleCount = count( $titles );
+                                       for ( $i = 0; $i < $titleCount; $i++ ) {
                                                if ( isset( $bylines[$i] ) ) {
                                                        // theoretically this should always be set
                                                        // but doesn't hurt to be careful.
@@ -352,8 +353,8 @@ class IPTC {
         * @todo Potentially this should also capture the timezone offset.
         * @param array $date The date tag
         * @param array $time The time tag
-        * @param $c
-        * @return String Date in exif format.
+        * @param string $c The charset
+        * @return string Date in EXIF format.
         */
        private static function timeHelper( $date, $time, $c ) {
                if ( count( $date ) === 1 ) {
@@ -437,7 +438,7 @@ class IPTC {
 
        /**
         * Helper function of a helper function to convert charset for iptc values.
-        * @param $data Mixed String or Array: The iptc string
+        * @param string|array $data The IPTC string
         * @param string $charset The charset
         *
         * @return string
@@ -469,7 +470,7 @@ class IPTC {
        /**
         * take the value of 1:90 tag and returns a charset
         * @param string $tag 1:90 tag.
-        * @return string charset name or "?"
+        * @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
         * only code that seems to have wide use. It does detect that code.