Passed
Pull Request — master (#17)
by Aleksei
02:31
created

ManyToMany   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 20 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cycle\Annotated\Annotation\Relation;
6
7
use JetBrains\PhpStorm\ExpectedValues;
8
9
final class ManyToMany
10
{
11
    public function __construct(
12
        string $target,
13
        string $though,
14
        bool $cascade = true,
15
        bool $nullable = false,
16
        string $innerKey = null,
17
        string $outerKey = '{parentRole}_{innerKey}',
18
        array $where = [],
19
        array $orderBy = [],
20
        string $thoughInnerKey = '{sourceRole}_{innerKey}',
21
        string $thoughOuterKey = '{targetRole}_{outerKey}',
22
        array $thoughWhere = [],
23
        bool $fkCreate = true,
24
        #[ExpectedValues(values: ['NO ACTION', 'CASCADE', 'SET NULL'])]
25
        string $fkAction = 'SET NULL',
26
        bool $indexCreate = true,
27
        #[ExpectedValues(values: ['lazy', 'eager'])]
28
        string $load = 'lazy',
29
        // Inverse $inverse = null, // can be uncommented for compatibility with php 8.1
30
    ) {
31
    }
32
}
33