Relation   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 85
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 22
dl 0
loc 85
ccs 0
cts 11
cp 0
rs 10
c 1
b 1
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 22 1
1
<?php
2
3
namespace Divergence\Models\Mapping;
4
5
use Attribute;
6
7
/**
8
 * @Annotation
9
 * @NamedArgumentConstructor
10
 * @Target({"PROPERTY","ANNOTATION"})
11
 */
12
#[Attribute(Attribute::TARGET_PROPERTY)]
13
final class Relation implements MappingAttribute
14
{
15
    /**
16
     * @var string|null
17
     * @readonly
18
     */
19
    public $type;
20
21
    /**
22
     * @var string|null
23
     * @readonly
24
     */
25
    public $class;
26
27
    /**
28
     * @var mixed
29
     * @readonly
30
     */
31
    public $linkClass;
32
33
    /**
34
     * @var string|null
35
     * @readonly
36
     */
37
    public $linkLocal;
38
39
    /**
40
     * @var string|null
41
     * @readonly
42
     */
43
    public $linkForeign;
44
45
    /**
46
     * @var string|null
47
     * @readonly
48
     */
49
    public $local;
50
51
    /**
52
     * @var string|null
53
     * @readonly
54
     */
55
    public $foreign;
56
57
    /**
58
     * @var string|null
59
     * @readonly
60
     */
61
    public $indexField;
62
63
    /**
64
     * @var array|string|null
65
     * @readonly
66
     */
67
    public $conditions;
68
69
    /**
70
     * @var array|string|null
71
     * @readonly
72
     */
73
    public $order;
74
75
    public function __construct(
76
        ?string $type = null,
77
        ?string $class = null,
78
        ?string $linkClass = null,
79
        ?string $linkLocal = null,
80
        ?string $linkForeign = null,
81
        ?string $local = null,
82
        ?string $foreign = null,
83
        ?string $indexField = null,
84
        $conditions = null,
85
        $order = null,
86
    ) {
87
        $this->type = $type;
88
        $this->class = $class;
89
        $this->linkClass = $linkClass;
90
        $this->linkLocal = $linkLocal;
91
        $this->linkForeign = $linkForeign;
92
        $this->local = $local;
93
        $this->foreign = $foreign;
94
        $this->indexField = $indexField;
95
        $this->conditions = $conditions;
96
        $this->order = $order;
97
    }
98
}
99