Code Duplication    Length = 9-9 lines in 2 locations

modules/videopress-v2/class.videopress-cli.php 1 location

@@ 21-29 (lines=9) @@
18
		 * wp videopress import kUJmAcSf
19
		 *
20
		 */
21
		public function import( $args ) {
22
			$guid = $args[0];
23
			$attachment_id = create_local_media_library_for_videopress_guid( $guid );
24
			if ( $attachment_id && ! is_wp_error( $attachment_id ) ) {
25
				WP_CLI::success( sprintf( __( 'The video has been imported as Attachment ID %d', 'jetpack' ), $attachment_id ) );
26
			} else {
27
				WP_CLI::error( __( 'An error has been encountered.', 'jetpack' ) );
28
			}
29
		}
30
31
		/**
32
		 * Manually runs the job to cleanup videos from the media library that failed during the upload process.

modules/videopress/utility-functions.php 1 location

@@ 193-201 (lines=9) @@
190
		 * wp videopress import kUJmAcSf
191
		 *
192
		 */
193
		public function import( $args ) {
194
			$guid = $args[0];
195
			$attachment_id = create_local_media_library_for_videopress_guid( $guid );
196
			if ( $attachment_id && ! is_wp_error( $attachment_id ) ) {
197
				WP_CLI::success( sprintf( __( 'The video has been imported as Attachment ID %d', 'jetpack' ), $attachment_id ) );
198
			} else {
199
				WP_CLI::error( __( 'An error has been encountered.', 'jetpack' ) );
200
			}
201
		}
202
	}
203
	WP_CLI::add_command( 'videopress', 'VideoPress_CLI' );
204
}