Code Duplication    Length = 10-10 lines in 2 locations

projects/packages/post-images/src/class-post-images.php 1 location

@@ 753-762 (lines=10) @@
750
751
		// If WPCOM hosted image use native transformations.
752
		$img_host = wp_parse_url( $src, PHP_URL_HOST );
753
		if ( '.files.wordpress.com' === substr( $img_host, -20 ) ) {
754
			return add_query_arg(
755
				array(
756
					'w'    => $width,
757
					'h'    => $height,
758
					'crop' => 1,
759
				),
760
				set_url_scheme( $src )
761
			);
762
		}
763
764
		// Use Photon magic.
765
		if ( function_exists( 'jetpack_photon_url' ) ) {

projects/plugins/jetpack/class.jetpack-post-images.php 1 location

@@ 762-771 (lines=10) @@
759
760
		// If WPCOM hosted image use native transformations
761
		$img_host = wp_parse_url( $src, PHP_URL_HOST );
762
		if ( '.files.wordpress.com' == substr( $img_host, -20 ) ) {
763
			return add_query_arg(
764
				array(
765
					'w'    => $width,
766
					'h'    => $height,
767
					'crop' => 1,
768
				),
769
				set_url_scheme( $src )
770
			);
771
		}
772
773
		// Use Photon magic
774
		if ( function_exists( 'jetpack_photon_url' ) ) {