Code Duplication    Length = 10-10 lines in 4 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
@@ 545-554 (lines=10) @@
542
     *
543
     * @return array
544
     */
545
    public function listTrashed($offset, $limit, array $sort = null)
546
    {
547
        try {
548
            return $this->innerGateway->listTrashed($offset, $limit, $sort);
549
        } catch (DBALException $e) {
550
            throw new RuntimeException('Database error', 0, $e);
551
        } catch (PDOException $e) {
552
            throw new RuntimeException('Database error', 0, $e);
553
        }
554
    }
555
556
    /**
557
     * 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}

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

@@ 408-417 (lines=10) @@
405
     *
406
     * @return string[][]
407
     */
408
    public function listVersions($contentId, $status = null, $limit = -1)
409
    {
410
        try {
411
            return $this->innerGateway->listVersions($contentId, $status, $limit);
412
        } catch (DBALException $e) {
413
            throw new RuntimeException('Database error', 0, $e);
414
        } catch (PDOException $e) {
415
            throw new RuntimeException('Database error', 0, $e);
416
        }
417
    }
418
419
    /**
420
     * Returns all version numbers for the given $contentId.