Code Duplication    Length = 13-13 lines in 2 locations

src/ApaiIO/ResponseTransformer/ObjectToItem.php 1 location

@@ 230-242 (lines=13) @@
227
228
            $sets = $this->item['ImageSets'];
229
230
            foreach( $sets as $set )
231
            {
232
                $row = array();
233
                if( isset( $set['MediumImage']['URL'] ) )
234
                {
235
                    $row['medium_image'] = $set['MediumImage']['URL'];
236
                }
237
                if( isset( $set['LargeImage']['URL'] ) )
238
                {
239
                    $row['large_image'] = $set['LargeImage']['URL'];
240
                }
241
                $this->data['image_sets'][] = $row;
242
            }
243
        }
244
    }
245

src/ApaiIO/ResponseTransformer/ObjectToItems.php 1 location

@@ 166-178 (lines=13) @@
163
164
			$sets = $this->items[$i]['ImageSets'];
165
166
			foreach( $sets as $set )
167
			{
168
				$row = array();
169
				if( isset($set['MediumImage']['URL']) )
170
				{
171
					$row['medium_image'] = $set['MediumImage']['URL'];
172
				}
173
				if( isset($set['LargeImage']['URL']) )
174
				{
175
					$row['large_image'] = $set['LargeImage']['URL'];
176
				}
177
				$this->data[$i]['image_sets'][] = $row;
178
			}
179
		}
180
	}
181