Completed
Push — develop ( 1b34c6...481302 )
by Paul
02:47
created

ValueTrait::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace PhpUnitGen\Model\PropertyTrait;
4
5
/**
6
 * Interface ValueTrait.
7
 *
8
 * @author     Paul Thébaud <[email protected]>.
9
 * @copyright  2017-2018 Paul Thébaud <[email protected]>.
10
 * @license    https://opensource.org/licenses/MIT The MIT license.
11
 * @link       https://github.com/paul-thebaud/phpunit-generator
12
 * @since      Class available since Release 2.0.0.
13
 */
14
trait ValueTrait
15
{
16
    /**
17
     * @var string|null $value A value symbolised by a string (bool false will be "false" for example).
18
     */
19
    protected $value;
20
21
    /**
22
     * @param string|null $value The new value to set.
23
     */
24
    public function setValue(?string $value): void
25
    {
26
        $this->value = $value;
27
    }
28
29
    /**
30
     * @return string|null The current value.
31
     */
32
    public function getValue(): ?string
33
    {
34
        return $this->value;
35
    }
36
}
37