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

BelongsTo   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 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 BelongsTo
10
{
11
    public function __construct(
12
        string $target,
13
        bool $cascade = true,
14
        bool $nullable = false,
15
        string $innerKey = '{relationName}_{outerKey}',
16
        string $outerKey = null,
17
        bool $fkCreate = true,
18
        #[ExpectedValues(values: ['NO ACTION', 'CASCADE', 'SET NULL'])]
19
        string $fkAction = 'CASCADE',
20
        bool $indexCreate = true,
21
        #[ExpectedValues(values: ['lazy', 'eager'])]
22
        string $load = 'lazy',
23
        // Inverse $inverse = null, // can be uncommented for compatibility with php 8.1
24
    ) {
25
    }
26
}
27