Code Duplication    Length = 12-12 lines in 3 locations

src/Observers/ProductMediaObserver.php 3 locations

@@ 70-81 (lines=12) @@
67
        $parentSku = $this->getValue(ColumnKeys::SKU);
68
69
        // query whether or not, we've a base image
70
        if ($baseImage = $this->getValue(ColumnKeys::BASE_IMAGE)) {
71
            // prepare and append the base image to the artefacts
72
            $artefacts[] = array(
73
                ColumnKeys::STORE_VIEW_CODE  => $storeViewCode,
74
                ColumnKeys::IMAGE_PARENT_SKU => $parentSku,
75
                ColumnKeys::IMAGE_PATH       => $baseImage,
76
                ColumnKeys::IMAGE_PATH_NEW   => $baseImage,
77
                ColumnKeys::IMAGE_LABEL      => $this->hasValue(ColumnKeys::BASE_IMAGE_LABEL) ?
78
                                                $this->getValue(ColumnKeys::BASE_IMAGE_LABEL) :
79
                                                $this->getDefaultImageLabel()
80
            );
81
        }
82
83
        // query whether or not, we've a small image
84
        if ($smallImage = $this->getValue(ColumnKeys::SMALL_IMAGE)) {
@@ 84-95 (lines=12) @@
81
        }
82
83
        // query whether or not, we've a small image
84
        if ($smallImage = $this->getValue(ColumnKeys::SMALL_IMAGE)) {
85
            // prepare and append the small image to the artefacts
86
            $artefacts[] = array(
87
                ColumnKeys::STORE_VIEW_CODE  => $storeViewCode,
88
                ColumnKeys::IMAGE_PARENT_SKU => $parentSku,
89
                ColumnKeys::IMAGE_PATH       => $smallImage,
90
                ColumnKeys::IMAGE_PATH_NEW   => $smallImage,
91
                ColumnKeys::IMAGE_LABEL      => $this->hasValue(ColumnKeys::SMALL_IMAGE_LABEL) ?
92
                                                $this->getValue(ColumnKeys::SMALL_IMAGE_LABEL) :
93
                                                $this->getDefaultImageLabel()
94
            );
95
        }
96
97
        // query whether or not, we've a small thumbnail
98
        if ($thumbnailImage = $this->getValue(ColumnKeys::THUMBNAIL_IMAGE)) {
@@ 98-109 (lines=12) @@
95
        }
96
97
        // query whether or not, we've a small thumbnail
98
        if ($thumbnailImage = $this->getValue(ColumnKeys::THUMBNAIL_IMAGE)) {
99
            // prepare and append the thumbnail image to the artefacts
100
            $artefacts[] = array(
101
                ColumnKeys::STORE_VIEW_CODE  => $storeViewCode,
102
                ColumnKeys::IMAGE_PARENT_SKU => $parentSku,
103
                ColumnKeys::IMAGE_PATH       => $thumbnailImage,
104
                ColumnKeys::IMAGE_PATH_NEW   => $thumbnailImage,
105
                ColumnKeys::IMAGE_LABEL      => $this->hasValue(ColumnKeys::THUMBNAIL_IMAGE_LABEL) ?
106
                                                $this->getValue(ColumnKeys::THUMBNAIL_IMAGE_LABEL) :
107
                                                $this->getDefaultImageLabel()
108
            );
109
        }
110
111
        // query whether or not, we've additional images
112
        if ($additionalImages = $this->getValue(ColumnKeys::ADDITIONAL_IMAGES, null, array($this, 'explode'))) {