Code Duplication    Length = 6-9 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php 2 locations

@@ 310-318 (lines=9) @@
307
        $statement->execute();
308
        $row = $statement->fetch(\PDO::FETCH_ASSOC);
309
310
        if (!empty($row)) {
311
            // If language mask is composite (consists of multiple languages) then remove given language from entry
312
            if ($row['lang_mask'] & ~($languageId | 1)) {
313
                $this->removeTranslation($row['parent'], $row['text_md5'], $languageId);
314
            } else {
315
                // Otherwise mark entry as history
316
                $this->historize($row['parent'], $row['text_md5'], $newId);
317
            }
318
        }
319
    }
320
321
    public function cleanupAfterSwap($action, $languageId, $newId, $languageMask)
@@ 364-369 (lines=6) @@
361
        foreach ($rows as $row) {
362
            // If entry was reused for publishing new swapped aliases, it is composite and we need
363
            // to keep it, so just remove translation
364
            if ($row['lang_mask'] & $languageMask) {
365
                $this->removeTranslation($row['parent'], $row['text_md5'], $languageId);
366
            } else {
367
                // Otherwise mark the whole entry as history
368
                $this->historize($row['parent'], $row['text_md5'], $newId);
369
            }
370
        }
371
    }
372