AndCondition   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
c 2
b 0
f 0
dl 0
loc 14
ccs 6
cts 6
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getString() 0 3 1
A __construct() 0 4 1
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