Code Duplication    Length = 6-6 lines in 2 locations

src/Repositories/EavAttributeOptionValueRepository.php 2 locations

@@ 212-217 (lines=6) @@
209
        $this->eavAttributeOptionValueByOptionIdAndStoreIdStmt->execute($params);
210
211
        // query whether or not the EAV attribute option value is available in the database
212
        if ($eavAttributeOptionValue = $this->eavAttributeOptionValueByOptionIdAndStoreIdStmt->fetch(\PDO::FETCH_ASSOC)) {
213
            // prepare the unique cache key for the EAV attribute option value
214
            $uniqueKey = array(CacheKeys::EAV_ATTRIBUTE_OPTION_VALUE => $eavAttributeOptionValue[$this->getPrimaryKeyName()]);
215
            // add the EAV attribute option value to the cache, register the cache key reference as well
216
            $this->cacheAdapter->toCache($uniqueKey, $eavAttributeOptionValue, array($cacheKey => $uniqueKey));
217
        }
218
219
        // finally, return it
220
        return $eavAttributeOptionValue;
@@ 256-261 (lines=6) @@
253
        $this->eavAttributeOptionValueByEntityTypeIdAndAttributeCodeAndStoreIdAndValueStmt->execute($params);
254
255
        // query whether or not the result has been cached
256
        if ($eavAttributeOptionValue = $this->eavAttributeOptionValueByEntityTypeIdAndAttributeCodeAndStoreIdAndValueStmt->fetch(\PDO::FETCH_ASSOC)) {
257
            // prepare the unique cache key for the EAV attribute option value
258
            $uniqueKey = array(CacheKeys::EAV_ATTRIBUTE_OPTION_VALUE => $eavAttributeOptionValue[$this->getPrimaryKeyName()]);
259
            // add the EAV attribute option value to the cache, register the cache key reference as well
260
            $this->cacheAdapter->toCache($uniqueKey, $eavAttributeOptionValue, array($cacheKey => $uniqueKey));
261
        }
262
263
        // finally, return it
264
        return $eavAttributeOptionValue;