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

@@ 165-173 (lines=9) @@
162
							$crop['target_h']
163
			);
164
			$result = $image->save( $save_filename );
165
			if ( is_wp_error( $result ) ) {
166
				// @codeCoverageIgnoreStart
167
				TimberHelper::error_log( 'Error resizing image' );
168
				TimberHelper::error_log( $result );
169
				return false;
170
				// @codeCoverageIgnoreEnd
171
			} else {
172
				return true;
173
			}
174
		} else if ( isset( $image->error_data['error_loading_image'] ) ) {
175
			// @codeCoverageIgnoreStart
176
			TimberHelper::error_log( 'Error loading ' . $image->error_data['error_loading_image'] );