Code Duplication    Length = 14-14 lines in 2 locations

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}

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

@@ 574-587 (lines=14) @@
571
    /**
572
     * {@inheritDoc}
573
     */
574
    public function convertBooleans($item)
575
    {
576
        if (is_array($item)) {
577
            foreach ($item as $key => $value) {
578
                if (is_bool($value) || is_numeric($item)) {
579
                    $item[$key] = ($value) ? 'true' : 'false';
580
                }
581
            }
582
        } elseif (is_bool($item) || is_numeric($item)) {
583
           $item = ($item) ? 'true' : 'false';
584
        }
585
586
        return $item;
587
    }
588
589
    /**
590
     * {@inheritDoc}