Code Duplication    Length = 3-3 lines in 2 locations

lib/endpoints/class-wp-rest-posts-controller.php 2 locations

@@ 405-407 (lines=3) @@
402
			$this->handle_featured_media( $request['featured_media'], $post->ID );
403
		}
404
405
		if ( ! empty( $schema['properties']['format'] ) && ! empty( $request['format'] ) ) {
406
			set_post_format( $post, $request['format'] );
407
		}
408
409
		if ( ! empty( $schema['properties']['template'] ) && isset( $request['template'] ) ) {
410
			$this->handle_template( $request['template'], $post->ID );
@@ 498-500 (lines=3) @@
495
496
		$schema = $this->get_item_schema();
497
498
		if ( ! empty( $schema['properties']['format'] ) && ! empty( $request['format'] ) ) {
499
			set_post_format( $post, $request['format'] );
500
		}
501
502
		if ( ! empty( $schema['properties']['featured_media'] ) && isset( $request['featured_media'] ) ) {
503
			$this->handle_featured_media( $request['featured_media'], $post_id );