Code Duplication    Length = 6-6 lines in 2 locations

lib/endpoints/class-wp-rest-revisions-controller.php 1 location

@@ 227-232 (lines=6) @@
224
			);
225
		}
226
227
		if ( ! empty( $schema['properties']['title'] ) ) {
228
			$data['title'] = array(
229
				'raw'      => $post->post_title,
230
				'rendered' => get_the_title( $post->ID ),
231
			);
232
		}
233
234
		if ( ! empty( $schema['properties']['content'] ) ) {
235

lib/endpoints/class-wp-rest-posts-controller.php 1 location

@@ 1163-1168 (lines=6) @@
1160
			$data['link'] = get_permalink( $post->ID );
1161
		}
1162
1163
		if ( ! empty( $schema['properties']['title'] ) ) {
1164
			$data['title'] = array(
1165
				'raw'      => $post->post_title,
1166
				'rendered' => get_the_title( $post->ID ),
1167
			);
1168
		}
1169
1170
		if ( ! empty( $schema['properties']['content'] ) ) {
1171