AbstractSingleCompare::getRight()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Xsolve\SalesforceClient\QueryBuilder\Expr\Compare;
4
5
use Xsolve\SalesforceClient\QueryBuilder\Visitor\VisitorInterface;
6
7
abstract class AbstractSingleCompare extends AbstractCompare
8
{
9
    /**
10
     * @var string
11
     */
12
    private $left;
13
14
    /**
15
     * @var string
16
     */
17
    private $right;
18
19 8
    public function __construct(string $left, string $right)
20
    {
21 8
        $this->left = $left;
22 8
        $this->right = $right;
23 8
    }
24
25 29
    public function getLeft(): string
26
    {
27 29
        return $this->left;
28
    }
29
30 29
    public function getRight(): string
31
    {
32 29
        return $this->right;
33
    }
34
35 15
    public function accept(VisitorInterface $visitor)
36
    {
37 15
        $visitor->visitSingleCompare($this);
38 15
    }
39
40 15
    public function update(array $values)
41
    {
42 15
        if (isset($values['left'])) {
43 15
            $this->left = $values['left'];
44
        }
45
46 15
        if (isset($values['right'])) {
47 15
            $this->right = $values['right'];
48
        }
49 15
    }
50
}
51