Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 1105-1107 (lines=3) @@
1102
			);
1103
		}
1104
1105
		if ( ! empty( $schema['properties']['modified'] ) ) {
1106
			$data['modified'] = $this->prepare_date_response( $post->post_modified_gmt, $post->post_modified );
1107
		}
1108
1109
		if ( ! empty( $schema['properties']['modified_gmt'] ) ) {
1110
			$data['modified_gmt'] = $this->prepare_date_response( $post->post_modified_gmt );

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

@@ 203-205 (lines=3) @@
200
			$data['id'] = $post->ID;
201
		}
202
203
		if ( ! empty( $schema['properties']['modified'] ) ) {
204
			$data['modified'] = $this->prepare_date_response( $post->post_modified_gmt, $post->post_modified );
205
		}
206
207
		if ( ! empty( $schema['properties']['modified_gmt'] ) ) {
208
			$data['modified_gmt'] = $this->prepare_date_response( $post->post_modified_gmt );