InExpr::__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 InExpr.
9
 */
10
class InExpr extends AbstractExpr
11
{
12
    /**
13
     * InExpr constructor.
14
     *
15
     * @param string|null $relation
16
     * @param string $column
17
     * @param mixed $value
18
     */
19 1
    public function __construct(?string $relation, string $column, $value)
20
    {
21 1
        parent::__construct(
22 1
            $relation,
23 1
            $column,
24 1
            $this->valueToArray(',', $value)
25
        );
26
27 1
        $this->setExpression('$in');
28 1
        $this->setOperator();
29 1
    }
30
}
31