Passed
Pull Request — master (#17)
by Aleksei
03:33
created

MorphedHasOne   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cycle\Annotated\Annotation\Relation\Morphed;
6
7
use JetBrains\PhpStorm\ExpectedValues;
8
9
final class MorphedHasOne
10
{
11
    public function __construct(
12
        string $target,
13
        bool $cascade = true,
14
        bool $nullable = false,
15
        string $innerKey = null,
16
        string $outerKey = '{parentRole}_{innerKey}',
17
        string $morphKey = '{relationName}_role',
18
        int $morphKeyLength = 32,
19
        bool $indexCreate = true,
20
        #[ExpectedValues(values: ['lazy', 'eager'])]
21
        string $load = 'lazy',
22
        // Inverse $inverse = null, // can be uncommented for compatibility with php 8.1
23
    ) {
24
    }
25
}
26