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

@@ 1340-1353 (lines=14) @@
1337
    /**
1338
     * {@inheritDoc}
1339
     */
1340
    public function convertBooleans($item)
1341
    {
1342
        if (is_array($item)) {
1343
            foreach ($item as $key => $value) {
1344
                if (is_bool($value) || is_numeric($item)) {
1345
                    $item[$key] = ($value) ? 1 : 0;
1346
                }
1347
            }
1348
        } elseif (is_bool($item) || is_numeric($item)) {
1349
            $item = ($item) ? 1 : 0;
1350
        }
1351
1352
        return $item;
1353
    }
1354
1355
    /**
1356
     * {@inheritDoc}