Total Complexity | 3 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class TargetField |
||
14 | { |
||
15 | /** |
||
16 | * Name of the field. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | private $name; |
||
21 | |||
22 | /** |
||
23 | * Random value generator. |
||
24 | * |
||
25 | * @var GeneratorInterface |
||
26 | */ |
||
27 | private $generator; |
||
28 | |||
29 | /** |
||
30 | * @param string $name |
||
31 | * @param GeneratorInterface $generator |
||
32 | */ |
||
33 | public function __construct(string $name, GeneratorInterface $generator) |
||
34 | { |
||
35 | $this->name = $name; |
||
36 | $this->generator = $generator; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Get the name of this field. |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getName(): string |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Generate next random value for this field. |
||
51 | * |
||
52 | * @return string|null |
||
53 | */ |
||
54 | public function generate() |
||
57 | } |
||
58 | } |
||
59 |