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

LeftJoin::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 14
rs 10
cc 1
nc 1
nop 5
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\Join;
15
16
use Valkyrja\Orm\Data\Join;
17
use Valkyrja\Orm\Enum\Comparison;
18
use Valkyrja\Orm\Enum\JoinOperator;
19
use Valkyrja\Orm\Enum\JoinType;
20
21
/**
22
 * Class LeftJoin.
23
 *
24
 * @author Melech Mizrachi
25
 */
26
readonly class LeftJoin extends Join
27
{
28
    /**
29
     * @param non-empty-string $table      The join table
0 ignored issues
show
Documentation Bug introduced by
The doc comment non-empty-string at position 0 could not be parsed: Unknown type name 'non-empty-string' at position 0 in non-empty-string.
Loading history...
30
     * @param non-empty-string $column     The column to compare
31
     * @param non-empty-string $joinColumn The join table column
32
     */
33
    public function __construct(
34
        public string $table,
35
        public string $column,
36
        public string $joinColumn,
37
        public Comparison $comparison,
38
        public JoinOperator $operator,
39
    ) {
40
        parent::__construct(
41
            table: $table,
42
            column: $column,
43
            joinColumn: $joinColumn,
44
            comparison: $comparison,
45
            operator: $operator,
46
            type: JoinType::LEFT,
47
        );
48
    }
49
}
50