Code Duplication    Length = 13-13 lines in 2 locations

json-endpoints/class.wpcom-json-api-edit-media-v1-2-endpoint.php 1 location

@@ 86-98 (lines=13) @@
83
	 *
84
	 * @return {Array} mime_type array
85
	 */
86
	static function get_allowed_mime_types( $default_mime_types ) {
87
		return array_unique( array_merge( $default_mime_types, array(
88
			'application/msword',                                                         // .doc
89
			'application/vnd.ms-powerpoint',                                              // .ppt, .pps
90
			'application/vnd.ms-excel',                                                   // .xls
91
			'application/vnd.openxmlformats-officedocument.presentationml.presentation',  // .pptx
92
			'application/vnd.openxmlformats-officedocument.presentationml.slideshow',     // .ppsx
93
			'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',          // .xlsx
94
			'application/vnd.openxmlformats-officedocument.wordprocessingml.document',    // .docx
95
			'application/vnd.oasis.opendocument.text',                                    // .odt
96
			'application/pdf',                                                            // .pdf
97
		) ) );
98
	}
99
100
	/**
101
	 * Update the media post grabbing the post values from

packages/jetpack-core/legacy/class.media.php 1 location

@@ 89-101 (lines=13) @@
86
	 *
87
	 * @return array mime_type array
88
	 */
89
	static function get_allowed_mime_types( $default_mime_types ) {
90
		return array_unique( array_merge( $default_mime_types, array(
91
			'application/msword',                                                         // .doc
92
			'application/vnd.ms-powerpoint',                                              // .ppt, .pps
93
			'application/vnd.ms-excel',                                                   // .xls
94
			'application/vnd.openxmlformats-officedocument.presentationml.presentation',  // .pptx
95
			'application/vnd.openxmlformats-officedocument.presentationml.slideshow',     // .ppsx
96
			'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',          // .xlsx
97
			'application/vnd.openxmlformats-officedocument.wordprocessingml.document',    // .docx
98
			'application/vnd.oasis.opendocument.text',                                    // .odt
99
			'application/pdf',                                                            // .pdf
100
		) ) );
101
	}
102
103
	/**
104
	 * Checks that the mime type of the file