Failed Conditions
Push — exceptions ( 64d080...7fc4df )
by Michael
15:07
created

Statement   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 20
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A bindParam() 0 7 3
A bindValue() 0 3 1
1
<?php
2
3
namespace Doctrine\DBAL\Driver\PDOSqlsrv;
4
5
use Doctrine\DBAL\Driver\PDOStatement;
6
use Doctrine\DBAL\ParameterType;
7
use PDO;
8
9
/**
10
 * PDO SQL Server Statement
11
 */
12
class Statement extends PDOStatement
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null)
18
    {
19
        if ($type === ParameterType::LARGE_OBJECT && $driverOptions === null) {
20
            $driverOptions = PDO::SQLSRV_ENCODING_BINARY;
21
        }
22
23
        return parent::bindParam($column, $variable, $type, $length, $driverOptions);
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function bindValue($param, $value, $type = ParameterType::STRING)
30
    {
31
        return $this->bindParam($param, $value, $type);
32
    }
33
}
34