Passed
Branch master (e30549)
by noitran
04:00
created

BetweenExpr::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 10
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace Noitran\RQL\Expressions;
4
5
/**
6
 * Class BetweenExpr
7
 */
8
class BetweenExpr extends AbstractExpr
9
{
10
    /**
11
     * BetweenExpr constructor.
12
     *
13
     * @param string|null $relation
14
     * @param string $column
15
     * @param mixed $value
16
     */
17 1
    public function __construct(?string $relation, string $column, $value)
18
    {
19 1
        parent::__construct(
20 1
            $relation,
21 1
            $column,
22 1
            $this->valueToArray(',', $value)
23
        );
24
25 1
        $this->setExpression('$between');
26 1
        $this->setOperator();
27 1
    }
28
}
29