Passed
Push — develop ( 45600c...ff69f6 )
by Paul
03:16
created

FinalTrait::isFinal()   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
 * Trait FinalTrait.
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 FinalTrait
15
{
16
    /**
17
     * @var bool $isFinal A boolean describing if it is final.
18
     */
19
    protected $isFinal = false;
20
21
    /**
22
     * @param bool $isFinal The new final value to set.
23
     */
24
    public function setIsFinal(bool $isFinal): void
25
    {
26
        $this->isFinal = $isFinal;
27
    }
28
29
    /**
30
     * @return bool True if it is final.
31
     */
32
    public function isFinal(): bool
33
    {
34
        return $this->isFinal;
35
    }
36
}
37