Code Duplication    Length = 23-23 lines in 3 locations

lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php 1 location

@@ 252-274 (lines=23) @@
249
    /**
250
     * {@inheritdoc}
251
     */
252
    public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
253
    {
254
        $rows = [];
255
256
        switch ($fetchMode) {
257
            case \PDO::FETCH_CLASS:
258
                while ($row = call_user_func_array([$this, 'fetch'], func_get_args())) {
259
                    $rows[] = $row;
260
                }
261
                break;
262
            case \PDO::FETCH_COLUMN:
263
                while ($row = $this->fetchColumn()) {
264
                    $rows[] = $row;
265
                }
266
                break;
267
            default:
268
                while ($row = $this->fetch($fetchMode)) {
269
                    $rows[] = $row;
270
                }
271
        }
272
273
        return $rows;
274
    }
275
276
    /**
277
     * {@inheritdoc}

lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php 1 location

@@ 239-261 (lines=23) @@
236
    /**
237
     * {@inheritdoc}
238
     */
239
    public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
240
    {
241
        $rows = [];
242
243
        switch ($fetchMode) {
244
            case PDO::FETCH_CLASS:
245
                while ($row = call_user_func_array([$this, 'fetch'], func_get_args())) {
246
                    $rows[] = $row;
247
                }
248
                break;
249
            case PDO::FETCH_COLUMN:
250
                while ($row = $this->fetchColumn()) {
251
                    $rows[] = $row;
252
                }
253
                break;
254
            default:
255
                while ($row = $this->fetch($fetchMode)) {
256
                    $rows[] = $row;
257
                }
258
        }
259
260
        return $rows;
261
    }
262
263
    /**
264
     * {@inheritdoc}

lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php 1 location

@@ 340-362 (lines=23) @@
337
    /**
338
     * {@inheritdoc}
339
     */
340
    public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
341
    {
342
        $rows = [];
343
344
        switch ($fetchMode) {
345
            case PDO::FETCH_CLASS:
346
                while ($row = call_user_func_array([$this, 'fetch'], func_get_args())) {
347
                    $rows[] = $row;
348
                }
349
                break;
350
            case PDO::FETCH_COLUMN:
351
                while ($row = $this->fetchColumn()) {
352
                    $rows[] = $row;
353
                }
354
                break;
355
            default:
356
                while ($row = $this->fetch($fetchMode)) {
357
                    $rows[] = $row;
358
                }
359
        }
360
361
        return $rows;
362
    }
363
364
    /**
365
     * {@inheritdoc}