Code Duplication    Length = 10-10 lines in 6 locations

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

@@ 247-256 (lines=10) @@
244
     * @param string $action
245
     * @param mixed|null $id
246
     */
247
    public function remove($action, $id = null)
248
    {
249
        try {
250
            $this->innerGateway->remove($action, $id);
251
        } catch (DBALException $e) {
252
            throw new \RuntimeException('Database error', 0, $e);
253
        } catch (PDOException $e) {
254
            throw new \RuntimeException('Database error', 0, $e);
255
        }
256
    }
257
258
    /**
259
     * Loads paged list of global aliases.
@@ 407-416 (lines=10) @@
404
    /**
405
     * {@inheritdoc}
406
     */
407
    public function bulkRemoveTranslation($languageId, $actions)
408
    {
409
        try {
410
            return $this->innerGateway->bulkRemoveTranslation($languageId, $actions);
411
        } catch (DBALException $e) {
412
            throw new \RuntimeException('Database error', 0, $e);
413
        } catch (PDOException $e) {
414
            throw new \RuntimeException('Database error', 0, $e);
415
        }
416
    }
417
}
418

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

@@ 116-125 (lines=10) @@
113
     *
114
     * @return array
115
     */
116
    public function loadByEmail($email)
117
    {
118
        try {
119
            return $this->innerGateway->loadByEmail($email);
120
        } catch (\DBALException $e) {
121
            throw new \RuntimeException('Database error', 0, $e);
122
        } catch (\PDOException $e) {
123
            throw new \RuntimeException('Database error', 0, $e);
124
        }
125
    }
126
127
    /**
128
     * Update the user information specified by the user struct.

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

@@ 751-760 (lines=10) @@
748
     * @param int $contentId
749
     * @param string $languageCode language code of the translation
750
     */
751
    public function removeTranslationFromContent($contentId, $languageCode)
752
    {
753
        try {
754
            return $this->innerGateway->removeTranslationFromContent($contentId, $languageCode);
755
        } catch (DBALException $e) {
756
            throw new RuntimeException('Database error', 0, $e);
757
        } catch (PDOException $e) {
758
            throw new RuntimeException('Database error', 0, $e);
759
        }
760
    }
761
}
762
@@ 322-331 (lines=10) @@
319
        }
320
    }
321
322
    public function loadContentInfoList(array $contentIds)
323
    {
324
        try {
325
            return $this->innerGateway->loadContentInfoList($contentIds);
326
        } catch (DBALException $e) {
327
            throw new RuntimeException('Database error', 0, $e);
328
        } catch (PDOException $e) {
329
            throw new RuntimeException('Database error', 0, $e);
330
        }
331
    }
332
333
    /**
334
     * Loads version info for content identified by $contentId and $versionNo.

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

@@ 131-140 (lines=10) @@
128
        }
129
    }
130
131
    public function loadGroupData(array $groupIds)
132
    {
133
        try {
134
            return $this->innerGateway->loadGroupData($groupIds);
135
        } catch (DBALException $e) {
136
            throw new RuntimeException('Database error', 0, $e);
137
        } catch (PDOException $e) {
138
            throw new RuntimeException('Database error', 0, $e);
139
        }
140
    }
141
142
    /**
143
     * Returns an array with data about the Group with $identifier.