PostgresBuilder::stringifyBindings()   A
last analyzed

Complexity

Conditions 4
Paths 4

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 4
nc 4
nop 1
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Staudenmeir\LaravelMigrationViews\Schema\Builders;
4
5
use Illuminate\Database\Schema\PostgresBuilder as Base;
6
7
class PostgresBuilder extends Base
8
{
9
    use ManagesViews {
10
        stringifyBindings as baseStringifyBindings;
11
    }
12
13
    /**
14
     * Stringify the query bindings.
15
     *
16
     * @param array $bindings
17
     * @return array
18
     */
19
    protected function stringifyBindings(array $bindings)
20
    {
21
        foreach ($bindings as &$binding) {
22
            if (is_bool($binding)) {
23
                $binding = $binding ? 'true' : 'false';
24
            }
25
        }
26
27
        return $this->baseStringifyBindings($bindings);
28
    }
29
}
30