Code Duplication    Length = 7-7 lines in 2 locations

class.photon.php 1 location

@@ 494-500 (lines=7) @@
491
					// Build array of Photon args and expose to filter before passing to Photon URL function.
492
					$args = array();
493
494
					if ( false !== $width && false !== $height ) {
495
						$args[ $transform ] = $width . ',' . $height;
496
					} elseif ( false !== $width ) {
497
						$args['w'] = $width;
498
					} elseif ( false !== $height ) {
499
						$args['h'] = $height;
500
					}
501
502
					/**
503
					 * Filter the array of Photon arguments added to an image when it goes through Photon.

3rd-party/class.jetpack-amp-support.php 1 location

@@ 506-512 (lines=7) @@
503
		// Build array of Photon args and expose to filter before passing to Photon URL function.
504
		$args = array();
505
506
		if ( false !== $width && false !== $height ) {
507
			$args[ $transform ] = $width . ',' . $height;
508
		} elseif ( false !== $width ) {
509
			$args['w'] = $width;
510
		} elseif ( false !== $height ) {
511
			$args['h'] = $height;
512
		}
513
514
		return $args;
515
	}