BetweenExpr::__construct()   A
last analyzed

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