Passed
Push — master ( a4f7f2...d3cc39 )
by Melech
04:09
created

AndWhere::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Orm\Data\Where;
15
16
use Valkyrja\Orm\Data\Value;
17
use Valkyrja\Orm\Data\Where;
18
use Valkyrja\Orm\Enum\Comparison;
19
use Valkyrja\Orm\Enum\WhereType;
20
21
/**
22
 * Class AndWhere.
23
 *
24
 * @author Melech Mizrachi
25
 */
26
readonly class AndWhere extends Where
27
{
28
    public function __construct(
29
        Value $value,
30
        Comparison $comparison = Comparison::EQUALS,
31
    ) {
32
        parent::__construct(
33
            value: $value,
34
            comparison: $comparison,
35
            type: WhereType::AND,
36
        );
37
    }
38
}
39