Code Duplication    Length = 3-3 lines in 5 locations

src/InMemoryList/Domain/Model/ListCollection.php 1 location

@@ 93-95 (lines=3) @@
90
            throw new ListElementDuplicateKeyException('Key '.$element->getUuid()->getUuid().' already in use.');
91
        }
92
93
        if (!ListElementConsistencyChecker::isConsistent($element, $this->elements)) {
94
            throw new ListElementNotConsistentException('Element '.$element->getUuid()->getUuid().' is not consistent with list data.');
95
        }
96
97
        $this->elements[$element->getUuid()->getUuid()] = $element;
98
    }

src/InMemoryList/Infrastructure/Persistance/ApcuRepository.php 1 location

@@ 253-255 (lines=3) @@
250
        $elementUuid = $listElement->getUuid();
251
        $body = $listElement->getBody();
252
253
        if (!ListElementConsistencyChecker::isConsistent($listElement, $this->findListByUuid($listUuid))) {
254
            throw new ListElementNotConsistentException('Element '.(string) $listElement->getUuid().' is not consistent with list data.');
255
        }
256
257
        $numberOfChunks = $this->getNumberOfChunks($listUuid);
258
        $chunkSize = $this->getChunkSize($listUuid);

src/InMemoryList/Infrastructure/Persistance/MemcachedRepository.php 1 location

@@ 264-266 (lines=3) @@
261
        $elementUuid = $listElement->getUuid();
262
        $body = $listElement->getBody();
263
264
        if (!ListElementConsistencyChecker::isConsistent($listElement, $this->findListByUuid($listUuid))) {
265
            throw new ListElementNotConsistentException('Element '.(string) $listElement->getUuid().' is not consistent with list data.');
266
        }
267
268
        $numberOfChunks = $this->getNumberOfChunks($listUuid);
269
        $chunkSize = $this->getChunkSize($listUuid);

src/InMemoryList/Infrastructure/Persistance/PdoRepository.php 1 location

@@ 306-308 (lines=3) @@
303
        $elementUuid = $listElement->getUuid();
304
        $body = $listElement->getBody();
305
306
        if (!ListElementConsistencyChecker::isConsistent($listElement, $this->findListByUuid($listUuid))) {
307
            throw new ListElementNotConsistentException('Element '.(string) $listElement->getUuid().' is not consistent with list data.');
308
        }
309
310
        $sql = 'INSERT INTO `'.self::LIST_ELEMENT_TABLE_NAME.'` (
311
                    `uuid`,

src/InMemoryList/Infrastructure/Persistance/RedisRepository.php 1 location

@@ 301-303 (lines=3) @@
298
        $elementUuid = $listElement->getUuid();
299
        $body = $listElement->getBody();
300
301
        if (!ListElementConsistencyChecker::isConsistent($listElement, $this->findListByUuid($listUuid))) {
302
            throw new ListElementNotConsistentException('Element '.(string) $listElement->getUuid().' is not consistent with list data.');
303
        }
304
305
        $numberOfChunks = $this->getNumberOfChunks($listUuid);
306
        $chunkSize = $this->getChunkSize($listUuid);