Completed
Push — 2.x ( db763c...24284c )
by Aleksei
05:34 queued 05:33
created

ForeignKey::getInnerColumns()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cycle\Schema\Definition;
6
7
final class ForeignKey
8
{
9
    /**
10
     * @var non-empty-string
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...
11
     */
12
    private string $target;
13
14
    /**
15
     * @var array<non-empty-string>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<non-empty-string> at position 2 could not be parsed: Unknown type name 'non-empty-string' at position 2 in array<non-empty-string>.
Loading history...
16
     */
17
    private array $innerColumns;
18
19
    /**
20
     * @var array<non-empty-string>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<non-empty-string> at position 2 could not be parsed: Unknown type name 'non-empty-string' at position 2 in array<non-empty-string>.
Loading history...
21
     */
22
    private array $outerColumns;
23
24
    private bool $createIndex;
25
26
    /**
27
     * @var non-empty-string
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...
28
     */
29
    private string $action;
30
31
    /**
32
     * @param non-empty-string $target
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...
33
     */
34
    public function setTarget(string $target): self
35
    {
36
        $this->target = $target;
37
38
        return $this;
39
    }
40
41
    /**
42
     * @return non-empty-string
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...
43
     */
44
    public function getTarget(): string
45
    {
46
        return $this->target;
47
    }
48
49
    /**
50
     * @param array<non-empty-string> $columns
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<non-empty-string> at position 2 could not be parsed: Unknown type name 'non-empty-string' at position 2 in array<non-empty-string>.
Loading history...
51
     */
52
    public function setInnerColumns(array $columns): self
53
    {
54
        $this->innerColumns = $columns;
55
56
        return $this;
57
    }
58
59
    /**
60
     * @return array<non-empty-string>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<non-empty-string> at position 2 could not be parsed: Unknown type name 'non-empty-string' at position 2 in array<non-empty-string>.
Loading history...
61
     */
62
    public function getInnerColumns(): array
63
    {
64
        return $this->innerColumns;
65
    }
66
67
    /**
68
     * @param array<non-empty-string> $columns
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<non-empty-string> at position 2 could not be parsed: Unknown type name 'non-empty-string' at position 2 in array<non-empty-string>.
Loading history...
69
     */
70
    public function setOuterColumns(array $columns): self
71
    {
72
        $this->outerColumns = $columns;
73
74
        return $this;
75
    }
76
77
    /**
78
     * @return array<non-empty-string>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<non-empty-string> at position 2 could not be parsed: Unknown type name 'non-empty-string' at position 2 in array<non-empty-string>.
Loading history...
79
     */
80
    public function getOuterColumns(): array
81
    {
82
        return $this->outerColumns;
83
    }
84
85
    /**
86
     * Create an index on innerKey.
87
     */
88
    public function createIndex(bool $createIndex = true): self
89
    {
90
        $this->createIndex = $createIndex;
91
92
        return $this;
93
    }
94
95
    public function isCreateIndex(): bool
96
    {
97
        return $this->createIndex;
98
    }
99
100
    /**
101
     * @param non-empty-string $action
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...
102
     */
103
    public function setAction(string $action): self
104
    {
105
        $this->action = $action;
106
107
        return $this;
108
    }
109
110
    /**
111
     * @return non-empty-string
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...
112
     */
113
    public function getAction(): string
114
    {
115
        return $this->action;
116
    }
117
}
118