Code Duplication    Length = 3-7 lines in 2 locations

projects/plugins/jetpack/modules/shortcodes/googleapps.php 1 location

@@ 159-161 (lines=3) @@
156
		$atts
157
	);
158
159
	if ( isset( $content_width ) && is_numeric( $attr['width'] ) && $attr['width'] > $content_width ) {
160
		$attr['width'] = $content_width;
161
	}
162
163
	if ( isset( $content_width ) && '560' === $attr['height'] ) {
164
		$attr['height'] = floor( $content_width * 3 / 4 );

projects/plugins/jetpack/modules/shortcodes/crowdsignal.php 1 location

@@ 540-546 (lines=7) @@
537
538
					if ( 'iframe' === $attributes['type'] ) {
539
						if ( 'auto' !== $attributes['height'] ) {
540
							if (
541
								isset( $content_width )
542
								&& is_numeric( $attributes['width'] )
543
								&& $attributes['width'] > $content_width
544
							) {
545
								$attributes['width'] = $content_width;
546
							}
547
548
							if ( ! $attributes['width'] ) {
549
								$attributes['width'] = '100%';