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

InExpr   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
namespace Noitran\RQL\Expressions;
4
5
/**
6
 * Class InExpr
7
 */
8
class InExpr extends AbstractExpr
9
{
10
    /**
11
     * InExpr 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('$in');
26 1
        $this->setOperator();
27 1
    }
28
}
29