Where::buildWhere()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Puzzle\QueryBuilder\Queries\Snippets\Builders;
6
7
use Puzzle\QueryBuilder\Condition;
8
use Puzzle\QueryBuilder\Escaper;
9
10
trait Where
11
{
12
    protected
13
        $where;
1 ignored issue
show
Coding Style introduced by
The visibility should be declared for property $where.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
14
15 24
    public function where(Condition $condition): self
16
    {
17 24
        $this->where->where($condition);
18
19 24
        return $this;
20
    }
21
22 30
    private function buildWhere(Escaper $escaper): string
23
    {
24 30
        $this->where->setEscaper($escaper);
25
26 30
        return $this->where->toString();
27
    }
28
}
29