Code Duplication    Length = 10-10 lines in 2 locations

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

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

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

@@ 239-248 (lines=10) @@
236
     * @param string $action
237
     * @param mixed|null $id
238
     */
239
    public function remove($action, $id = null)
240
    {
241
        try {
242
            $this->innerGateway->remove($action, $id);
243
        } catch (DBALException $e) {
244
            throw new \RuntimeException('Database error', 0, $e);
245
        } catch (PDOException $e) {
246
            throw new \RuntimeException('Database error', 0, $e);
247
        }
248
    }
249
250
    /**
251
     * Loads paged list of global aliases.