Code Duplication    Length = 16-16 lines in 2 locations

extensions/blocks/tiled-gallery/tiled-gallery.php 2 locations

@@ 98-113 (lines=16) @@
95
						$min_width = min( self::IMG_SRCSET_WIDTH_MIN, $orig_width, $orig_height );
96
						$max_width = min( self::IMG_SRCSET_WIDTH_MAX, $orig_width, $orig_height );
97
98
						for ( $w = $min_width; $w <= $max_width; $w = min( $max_width, $w + self::IMG_SRCSET_WIDTH_STEP ) ) {
99
							$srcset_src = add_query_arg(
100
								array(
101
									'resize' => $w . ',' . $w,
102
									'strip'  => 'info',
103
								),
104
								$orig_src
105
							);
106
							if ( $is_ssl ) {
107
								$srcset_src = add_query_arg( 'ssl', '1', $srcset_src );
108
							}
109
							$srcset_parts[] = esc_url( $srcset_src ) . ' ' . $w . 'w';
110
							if ( $w >= $max_width ) {
111
								break;
112
							}
113
						}
114
					} else {
115
						$min_width = min( self::IMG_SRCSET_WIDTH_MIN, $orig_width );
116
						$max_width = min( self::IMG_SRCSET_WIDTH_MAX, $orig_width );
@@ 118-133 (lines=16) @@
115
						$min_width = min( self::IMG_SRCSET_WIDTH_MIN, $orig_width );
116
						$max_width = min( self::IMG_SRCSET_WIDTH_MAX, $orig_width );
117
118
						for ( $w = $min_width; $w <= $max_width; $w = min( $max_width, $w + self::IMG_SRCSET_WIDTH_STEP ) ) {
119
							$srcset_src = add_query_arg(
120
								array(
121
									'strip' => 'info',
122
									'w'     => $w,
123
								),
124
								$orig_src
125
							);
126
							if ( $is_ssl ) {
127
								$srcset_src = add_query_arg( 'ssl', '1', $srcset_src );
128
							}
129
							$srcset_parts[] = esc_url( $srcset_src ) . ' ' . $w . 'w';
130
							if ( $w >= $max_width ) {
131
								break;
132
							}
133
						}
134
					}
135
136
					if ( ! empty( $srcset_parts ) ) {