Conditions | 4 |
Paths | 4 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
9 | 6 | public function where($predicate, $value = null) |
|
10 | { |
||
11 | 6 | if ($value) { |
|
12 | 5 | $this->andWhere($this->normalizePredicate($predicate)); |
|
13 | 5 | $this->createPositionalParameter($value); |
|
14 | 5 | return $this; |
|
15 | } |
||
16 | |||
17 | 2 | if (is_array($predicate)) { |
|
18 | 1 | foreach ($predicate as $key => $value) { |
|
19 | 1 | $this->where($this->normalizePredicate($key), $value); |
|
20 | } |
||
21 | |||
22 | 1 | return $this; |
|
23 | } |
||
24 | |||
25 | 1 | $this->andWhere($predicate); |
|
26 | |||
27 | 1 | return $this; |
|
28 | } |
||
29 | |||
39 |