Code Duplication    Length = 9-10 lines in 3 locations

src/Db/Driver/Pdo.php 3 locations

@@ 81-90 (lines=10) @@
78
     * @return bool
79
     * @throws Exception
80
     */
81
    public function rollback()
82
    {
83
        try {
84
            $this->log(Logger::DEBUG, 'Transaction rollback');
85
            return $this->getDriver()->rollBack();
86
        } catch (\PDOException $e) {
87
            $this->log(Logger::ERROR, $e->getMessage(), array('error' => $e));
88
            throw new Exception($e->getMessage(), (int)$e->getCode(), $e);
89
        }
90
    }
91
92
    /**
93
     * @return mixed
@@ 124-133 (lines=10) @@
121
     * @return bool
122
     * @throws Exception
123
     */
124
    public function commit()
125
    {
126
        try {
127
            $this->log(Logger::DEBUG, 'Transaction commit');
128
            return $this->getDriver()->commit();
129
        } catch (\PDOException $e) {
130
            $this->log(Logger::ERROR, $e->getMessage(), array('error' => $e));
131
            throw new Exception($e->getMessage(), (int)$e->getCode(), $e);
132
        }
133
    }
134
135
    /**
136
     * Execute a statement for given values
@@ 182-190 (lines=9) @@
179
     * @return string
180
     * @throws Exception
181
     */
182
    public function lastInsertId($name = null)
183
    {
184
        try {
185
            return $this->getDriver()->lastInsertId($name);
186
        } catch (\PDOException $e) {
187
            $this->log(Logger::ERROR, $e->getMessage(), array('error' => $e));
188
            throw new Exception($e->getMessage(), (int)$e->getCode(), $e);
189
        }
190
    }
191
192
    /**
193
     * Retrieve number of affected rows of a statement