Code Duplication    Length = 4-4 lines in 2 locations

src/wp-includes/class-wp-image-editor-gd.php 1 location

@@ 259-262 (lines=4) @@
256
257
				imagedestroy( $image );
258
259
				if ( ! is_wp_error( $resized ) && $resized ) {
260
					unset( $resized['path'] );
261
					$metadata[$size] = $resized;
262
				}
263
			}
264
265
			$this->size = $orig_size;

src/wp-includes/class-wp-image-editor-imagick.php 1 location

@@ 461-464 (lines=4) @@
458
				$this->image->destroy();
459
				$this->image = null;
460
461
				if ( ! is_wp_error( $resized ) && $resized ) {
462
					unset( $resized['path'] );
463
					$metadata[$size] = $resized;
464
				}
465
			}
466
467
			$this->size = $orig_size;