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

OrWhere   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
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 OrWhere.
23
 *
24
 * @author Melech Mizrachi
25
 */
26
readonly class OrWhere 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::OR,
36
        );
37
    }
38
}
39