GeneratorOptions::setConfigName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace LSB\NumberingBundle\Model;
5
6
/**
7
 * Class GeneratorOptions
8
 * @package LSB\NumberingBundle\Model
9
 */
10
class GeneratorOptions
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $configName;
16
17
    /**
18
     * @var string|null
19
     */
20
    protected $contextObjectValue;
21
22
    /**
23
     * @var \DateTime|null
24
     */
25
    protected $date;
26
27
    /**
28
     * GeneratorOptions constructor.
29
     * @param string $configName
30
     */
31 1
    public function __construct(string $configName)
32
    {
33 1
        $this->setConfigName($configName);
34 1
    }
35
36
37
    /**
38
     * @return string
39
     */
40 1
    public function getConfigName(): string
41
    {
42 1
        return $this->configName;
43
    }
44
45
    /**
46
     * @param string $configName
47
     * @return GeneratorOptions
48
     */
49 1
    public function setConfigName(string $configName): GeneratorOptions
50
    {
51 1
        $this->configName = $configName;
52 1
        return $this;
53
    }
54
55
    /**
56
     * @return string|null
57
     */
58 1
    public function getContextObjectValue(): ?string
59
    {
60 1
        return $this->contextObjectValue;
61
    }
62
63
    /**
64
     * @param string|null $contextObjectValue
65
     * @return GeneratorOptions
66
     */
67 1
    public function setContextObjectValue(?string $contextObjectValue): GeneratorOptions
68
    {
69 1
        $this->contextObjectValue = $contextObjectValue;
70 1
        return $this;
71
    }
72
73
    /**
74
     * @return \DateTime|null
75
     */
76 1
    public function getDate(): ?\DateTime
77
    {
78 1
        return $this->date;
79
    }
80
81
    /**
82
     * @param \DateTime|null $date
83
     * @return GeneratorOptions
84
     */
85 1
    public function setDate(?\DateTime $date): GeneratorOptions
86
    {
87 1
        $this->date = $date;
88 1
        return $this;
89
    }
90
91
}
92