Code Duplication    Length = 8-9 lines in 2 locations

lib/timber-user.php 1 location

@@ 140-148 (lines=9) @@
137
	 * @param string $field_name
138
	 * @return mixed
139
	 */
140
	function get_meta_field($field_name) {
141
		$value = null;
142
		$value = apply_filters('timber_user_get_meta_field_pre', $value, $this->ID, $field_name, $this);
143
		if ( $value === null ) {
144
			$value = get_user_meta($this->ID, $field_name, true);
145
		}
146
		$value = apply_filters('timber_user_get_meta_field', $value, $this->ID, $field_name, $this);
147
		return $value;
148
	}
149
150
	/**
151
	 * @return array|null

lib/timber-comment.php 1 location

@@ 255-262 (lines=8) @@
252
	 * @param string $field_name
253
	 * @return mixed
254
	 */
255
	protected function get_meta_field($field_name) {
256
		$value = apply_filters('timber_comment_get_meta_field_pre', null, $this->ID, $field_name, $this);
257
		if ($value === null) {
258
			$value = get_comment_meta($this->ID, $field_name, true);
259
		}
260
		$value = apply_filters('timber_comment_get_meta_field', $value, $this->ID, $field_name, $this);
261
		return $value;
262
	}
263
264
	/**
265
	 * Enqueue the WP threaded comments javascript,