Code Duplication    Length = 10-10 lines in 3 locations

eZ/Publish/Core/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php 2 locations

@@ 95-104 (lines=10) @@
92
     *
93
     * @return mixed[][]
94
     */
95
    public function find(Criterion $criterion, $offset = 0, $limit = null, array $sortClauses = null)
96
    {
97
        try {
98
            return $this->innerGateway->find($criterion, $offset, $limit, $sortClauses);
99
        } catch (DBALException $e) {
100
            throw new RuntimeException('Database error', 0, $e);
101
        } catch (PDOException $e) {
102
            throw new RuntimeException('Database error', 0, $e);
103
        }
104
    }
105
106
    /**
107
     * Loads data for all Locations for $contentId, optionally only in the
@@ 563-572 (lines=10) @@
560
     *
561
     * @return array
562
     */
563
    public function listTrashed($offset, $limit, array $sort = null)
564
    {
565
        try {
566
            return $this->innerGateway->listTrashed($offset, $limit, $sort);
567
        } catch (DBALException $e) {
568
            throw new RuntimeException('Database error', 0, $e);
569
        } catch (PDOException $e) {
570
            throw new RuntimeException('Database error', 0, $e);
571
        }
572
    }
573
574
    /**
575
     * Removes trashed element identified by $id from trash.

eZ/Publish/Core/Persistence/Legacy/URL/Gateway/ExceptionConversion.php 1 location

@@ 52-61 (lines=10) @@
49
    /**
50
     * {@inheritdoc}
51
     */
52
    public function find(Criterion $criterion, $offset, $limit, array $sortClauses = [], $doCount = true)
53
    {
54
        try {
55
            return $this->innerGateway->find($criterion, $offset, $limit, $sortClauses, $doCount);
56
        } catch (DBALException $e) {
57
            throw new RuntimeException('Database error', 0, $e);
58
        } catch (PDOException $e) {
59
            throw new RuntimeException('Database error', 0, $e);
60
        }
61
    }
62
63
    /**
64
     * {@inheritdoc}