Code Duplication    Length = 9-9 lines in 2 locations

lib/image/timber-image-operation-retina.php 1 location

@@ 58-66 (lines=9) @@
55
            $h = $src_h * $this->factor;
56
            $image->crop( 0, 0, $src_w, $src_h, $w, $h );
57
            $result = $image->save( $save_filename );
58
            if ( is_wp_error( $result ) ) {
59
            	// @codeCoverageIgnoreStart
60
				TimberHelper::error_log( 'Error resizing image' );
61
				TimberHelper::error_log( $result );
62
				return false;
63
				// @codeCoverageIgnoreEnd
64
            } else {
65
                return true;
66
            }
67
        } else if ( isset( $image->error_data['error_loading_image'] ) ) {
68
            TimberHelper::error_log( 'Error loading ' . $image->error_data['error_loading_image'] );
69
        } else {

lib/image/timber-image-operation-resize.php 1 location

@@ 186-194 (lines=9) @@
183
							$crop['target_h']
184
			);
185
			$result = $image->save( $save_filename );
186
			if ( is_wp_error( $result ) ) {
187
				// @codeCoverageIgnoreStart
188
				TimberHelper::error_log( 'Error resizing image' );
189
				TimberHelper::error_log( $result );
190
				return false;
191
				// @codeCoverageIgnoreEnd
192
			} else {
193
				return true;
194
			}
195
		} else if ( isset( $image->error_data['error_loading_image'] ) ) {
196
			// @codeCoverageIgnoreStart
197
			TimberHelper::error_log( 'Error loading ' . $image->error_data['error_loading_image'] );