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

StaticTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 21
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isStatic() 0 3 1
A setIsStatic() 0 3 1
1
<?php
2
3
namespace PhpUnitGen\Model\PropertyTrait;
4
5
/**
6
 * Trait StaticTrait.
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 StaticTrait
15
{
16
    /**
17
     * @var bool $isStatic A boolean describing if it is static.
18
     */
19
    protected $isStatic = false;
20
21
    /**
22
     * @param bool $isStatic The new static value to set.
23
     */
24
    public function setIsStatic(bool $isStatic): void
25
    {
26
        $this->isStatic = $isStatic;
27
    }
28
29
    /**
30
     * @return bool True if it is static.
31
     */
32
    public function isStatic(): bool
33
    {
34
        return $this->isStatic;
35
    }
36
}
37