BinaryConstraintOperator::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
/**
4
 * This file is part of the Cubiche package.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Cubiche\Core\Specification\Constraint;
12
13
use Cubiche\Core\Selector\SelectorInterface;
14
use Cubiche\Core\Specification\Specification;
15
16
/**
17
 * Abstract Binary Constraint Operator Class.
18
 *
19
 * @author Karel Osorio Ramírez <[email protected]>
20
 */
21
abstract class BinaryConstraintOperator extends Specification
22
{
23
    /**
24
     * @var SelectorInterface
25
     */
26
    protected $left;
27
28
    /**
29
     * @var SelectorInterface
30
     */
31
    protected $right;
32
33
    /**
34
     * @param SelectorInterface $left
35
     * @param SelectorInterface $right
36
     */
37
    public function __construct(SelectorInterface $left, SelectorInterface $right)
38
    {
39
        $this->left = $left;
40
        $this->right = $right;
41
    }
42
43
    /**
44
     * @return \Cubiche\Core\Selector\SelectorInterface
45
     */
46
    public function left()
47
    {
48
        return $this->left;
49
    }
50
51
    /**
52
     * @return \Cubiche\Core\Selector\SelectorInterface
53
     */
54
    public function right()
55
    {
56
        return $this->right;
57
    }
58
}
59