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

@@ 249-258 (lines=10) @@
246
     * @param string $action
247
     * @param mixed|null $id
248
     */
249
    public function remove($action, $id = null)
250
    {
251
        try {
252
            $this->innerGateway->remove($action, $id);
253
        } catch (DBALException $e) {
254
            throw new \RuntimeException('Database error', 0, $e);
255
        } catch (PDOException $e) {
256
            throw new \RuntimeException('Database error', 0, $e);
257
        }
258
    }
259
260
    /**
261
     * Loads paged list of global aliases.