*
* @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 ) {
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;
* 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.
*/
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 ) === '-' ) {
/**
* 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 );
/**
* 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 );
/**
* 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