Code Duplication    Length = 3-4 lines in 2 locations

includes/CMB2_Utils.php 2 locations

@@ 128-131 (lines=4) @@
125
			foreach ( $image_sizes as $_size => $data ) {
126
127
				// If there's an exact match to an existing image size, short circuit.
128
				if ( $data['width'] == $size[0] && $data['height'] == $size[1] ) {
129
					$candidates[ $data['width'] * $data['height'] ] = array( $_size, $data );
130
					break;
131
				}
132
133
				// If it's not an exact match, consider larger sizes with the same aspect ratio.
134
				if ( $data['width'] >= $size[0] && $data['height'] >= $size[1] ) {
@@ 135-137 (lines=3) @@
132
133
				// If it's not an exact match, consider larger sizes with the same aspect ratio.
134
				if ( $data['width'] >= $size[0] && $data['height'] >= $size[1] ) {
135
					if ( wp_image_matches_ratio( $data['width'], $data['height'], $size[0], $size[1] ) ) {
136
						$candidates[ $data['width'] * $data['height'] ] = array( $_size, $data );
137
					}
138
				}
139
			}
140