Code Duplication    Length = 14-14 lines in 2 locations

lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php 1 location

@@ 582-595 (lines=14) @@
579
    /**
580
     * {@inheritDoc}
581
     */
582
    public function convertBooleans($item)
583
    {
584
        if (is_array($item)) {
585
            foreach ($item as $key => $value) {
586
                if (is_bool($value) || is_numeric($item)) {
587
                    $item[$key] = ($value) ? 'true' : 'false';
588
                }
589
            }
590
        } elseif (is_bool($item) || is_numeric($item)) {
591
           $item = ($item) ? 'true' : 'false';
592
        }
593
594
        return $item;
595
    }
596
597
    /**
598
     * {@inheritDoc}

lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php 1 location

@@ 1348-1361 (lines=14) @@
1345
    /**
1346
     * {@inheritDoc}
1347
     */
1348
    public function convertBooleans($item)
1349
    {
1350
        if (is_array($item)) {
1351
            foreach ($item as $key => $value) {
1352
                if (is_bool($value) || is_numeric($item)) {
1353
                    $item[$key] = ($value) ? 1 : 0;
1354
                }
1355
            }
1356
        } elseif (is_bool($item) || is_numeric($item)) {
1357
            $item = ($item) ? 1 : 0;
1358
        }
1359
1360
        return $item;
1361
    }
1362
1363
    /**
1364
     * {@inheritDoc}