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

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