AndCondition::getString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Nip\Database\Query\Condition;
4
5
/**
6
 * Class AndCondition
7
 * @package Nip\Database\Query\Condition
8
 */
9
class AndCondition extends Condition
10 5
{
11
    protected $_condition;
12 5
    protected $_andCondition;
13 5
14 5
    public function __construct($condition, $andCondition)
15
    {
16 5
        $this->_condition = $condition;
17
        $this->_andCondition = $andCondition;
18 5
    }
19
20
    public function getString()
21
    {
22
        return $this->protectCondition($this->_condition->getString()) . " AND " . $this->protectCondition($this->_andCondition->getString()) . "";
23
    }
24
}
25