Code Duplication    Length = 6-6 lines in 2 locations

lib/Doctrine/DBAL/Statement.php 1 location

@@ 113-118 (lines=6) @@
110
            if (is_string($type)) {
111
                $type = Type::getType($type);
112
            }
113
            if ($type instanceof Type) {
114
                $value = $type->convertToDatabaseValue($value, $this->platform);
115
                $bindingType = $type->getBindingType();
116
            } else {
117
                $bindingType = $type; // PDO::PARAM_* constants
118
            }
119
120
            return $this->stmt->bindValue($name, $value, $bindingType);
121
        } else {

lib/Doctrine/DBAL/Connection.php 1 location

@@ 1591-1596 (lines=6) @@
1588
        if (is_string($type)) {
1589
            $type = Type::getType($type);
1590
        }
1591
        if ($type instanceof Type) {
1592
            $value = $type->convertToDatabaseValue($value, $this->getDatabasePlatform());
1593
            $bindingType = $type->getBindingType();
1594
        } else {
1595
            $bindingType = $type; // PDO::PARAM_* constants
1596
        }
1597
1598
        return [$value, $bindingType];
1599
    }