Code Duplication    Length = 14-15 lines in 2 locations

src/Database.php 2 locations

@@ 154-168 (lines=15) @@
151
     * @param  mixed|array $params    (Optional) The array of values that will be binded to the prepared statement
152
     * @return array       Returns an array of the values received from the query
153
     */
154
    public function execute($queryText, $params = false)
155
    {
156
        if (!is_array($params)) {
157
            $params = array($params);
158
        }
159
160
        $debug = new DatabaseQuery($queryText, $params);
161
162
        $query = $this->doQuery($queryText, $params);
163
        $return = $query->rowCount();
164
165
        $debug->finish($return);
166
167
        return $return;
168
    }
169
170
    /**
171
     * Prepares and executes a MySQL prepared SELECT statement. <em>Second two parameter is optional when using this function to execute a query with no placeholders.</em>
@@ 177-190 (lines=14) @@
174
     * @param  mixed|array $params    (Optional) The array of values that will be binded to the prepared statement
175
     * @return array       Returns an array of the values received from the query
176
     */
177
    public function query($queryText, $params = false)
178
    {
179
        if (!is_array($params)) {
180
            $params = array($params);
181
        }
182
183
        $debug = new DatabaseQuery($queryText, $params);
184
185
        $return = $this->doQuery($queryText, $params)->fetchAll();
186
187
        $debug->finish($return);
188
189
        return $return;
190
    }
191
192
    /**
193
     * Perform a query