Code Duplication    Length = 6-6 lines in 2 locations

lib/timber-user.php 1 location

@@ 161-166 (lines=6) @@
158
				$um = get_user_meta($this->ID);
159
			}
160
			$custom = array();
161
			foreach ($um as $key => $value) {
162
				if ( is_array($value) && count($value) == 1 ) {
163
					$value = $value[0];
164
				}
165
				$custom[$key] = maybe_unserialize($value);
166
			}
167
			$custom = apply_filters('timber_user_get_meta', $custom, $this->ID, $this);
168
			return $custom;
169
		}

lib/timber-post.php 1 location

@@ 420-425 (lines=6) @@
417
		if ( !is_array($customs) || empty($customs) ) {
418
			return array();
419
		}
420
		foreach ( $customs as $key => $value ) {
421
			if ( is_array($value) && count($value) == 1 && isset($value[0]) ) {
422
				$value = $value[0];
423
			}
424
			$customs[$key] = maybe_unserialize($value);
425
		}
426
		$customs = apply_filters('timber_post_get_meta', $customs, $pid, $this);
427
		return $customs;
428
	}