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

@@ 454-459 (lines=6) @@
451
		if ( !is_array($customs) || empty($customs) ) {
452
			return array();
453
		}
454
		foreach ( $customs as $key => $value ) {
455
			if ( is_array($value) && count($value) == 1 && isset($value[0]) ) {
456
				$value = $value[0];
457
			}
458
			$customs[$key] = maybe_unserialize($value);
459
		}
460
		$customs = apply_filters('timber_post_get_meta', $customs, $pid, $this);
461
		return $customs;
462
	}