Passed
Push — 17667-sqlite-create-index-with... ( 21cdd8...b9d5ca )
by Alexander
84:30 queued 44:33
created

Command::bindPendingParams()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
eloc 7
nc 3
nop 0
dl 0
loc 11
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * @link http://www.yiiframework.com/
4
 * @copyright Copyright (c) 2008 Yii Software LLC
5
 * @license http://www.yiiframework.com/license/
6
 */
7
8
namespace yii\db\oci;
9
10
/**
11
 * Command represents an Oracle SQL statement to be executed against a database.
12
 *
13
 * {@inheritdoc}
14
 *
15
 * @since 2.0.33
16
 */
17
class Command extends \yii\db\Command
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    protected function bindPendingParams()
23
    {
24
        foreach ($this->pendingParams as $name => $value) {
25
            if (\PDO::PARAM_STR === $value[1]) {
26
                $passedByRef = $value[0];
27
                $this->pdoStatement->bindParam($name, $passedByRef, $value[1], strlen($value[0]));
28
            } else {
29
                $this->pdoStatement->bindValue($name, $value[0], $value[1]);
30
            }
31
        }
32
        $this->pendingParams = [];
33
    }
34
}
35