Passed
Push — master ( 265c0b...e337ae )
by Webnet
01:48
created

ConfigGuesserHint::unique()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace WebnetFr\DatabaseAnonymizer\ConfigGuesser;
4
5
/**
6
 * @author Vlad Riabchenko <[email protected]>
7
 */
8
class ConfigGuesserHint
9
{
10
    /**
11
     * @var string
12
     */
13
    public $formatter;
14
15
    /**
16
     * @var string[]
17
     */
18
    public $words;
19
20
    /**
21
     * @var array
22
     */
23
    public $arguments;
24
25
    /**
26
     * @var bool
27
     */
28
    public $date;
29
30
    /**
31
     * @var bool
32
     */
33
    public $unique;
34
35
    /**
36
     * @var string
37
     */
38
    public $locale;
39
40
    /**
41
     * @param string $formatter
42
     */
43
    public function __construct(string $formatter)
44
    {
45
        $this->formatter = $formatter;
46
    }
47
48
    /**
49
     * Set words.
50
     *
51
     * @param string[] $words
52
     *
53
     * @return $this
54
     */
55
    public function words(array $words)
56
    {
57
        $this->words = $words;
58
59
        return $this;
60
    }
61
62
    /**
63
     * Set arguments.
64
     *
65
     * @param array $arguments
66
     *
67
     * @return $this
68
     */
69
    public function arguments(array $arguments)
70
    {
71
        $this->arguments = $arguments;
72
73
        return $this;
74
    }
75
76
    /**
77
     * Set date.
78
     *
79
     * @param bool $date
80
     *
81
     * @return $this
82
     */
83
    public function date(bool $date)
84
    {
85
        $this->date = $date;
86
87
        return $this;
88
    }
89
90
    /**
91
     * Set unique.
92
     *
93
     * @param bool $unique
94
     *
95
     * @return $this
96
     */
97
    public function unique(bool $unique)
98
    {
99
        $this->unique = $unique;
100
101
        return $this;
102
    }
103
104
    /**
105
     * Set locale.
106
     *
107
     * @param string $locale
108
     *
109
     * @return $this
110
     */
111
    public function locale(string $locale)
112
    {
113
        $this->locale = $locale;
114
115
        return $this;
116
    }
117
}
118