Completed
Push — master ( f4ef0a...d00cab )
by Marco
16s
created

BetweenExpression   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 40
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A dispatch() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ORM\Query\AST;
6
7
class BetweenExpression extends Node
8
{
9
    /**
10
     * @var ArithmeticExpression
11
     */
12
    public $expression;
13
14
    /**
15
     * @var ArithmeticExpression
16
     */
17
    public $leftBetweenExpression;
18
19
    /**
20
     * @var ArithmeticExpression
21
     */
22
    public $rightBetweenExpression;
23
24
    /**
25
     * @var bool
26
     */
27
    public $not;
28
29
    /**
30
     * @param ArithmeticExpression $expr
31
     * @param ArithmeticExpression $leftExpr
32
     * @param ArithmeticExpression $rightExpr
33
     */
34 8
    public function __construct($expr, $leftExpr, $rightExpr)
35
    {
36 8
        $this->expression             = $expr;
37 8
        $this->leftBetweenExpression  = $leftExpr;
38 8
        $this->rightBetweenExpression = $rightExpr;
39 8
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44 6
    public function dispatch($sqlWalker)
45
    {
46 6
        return $sqlWalker->walkBetweenExpression($this);
47
    }
48
}
49