PostgresBuilder   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 21
rs 10
c 2
b 0
f 0
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A stringifyBindings() 0 9 4
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