AbstractTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setIsAbstract() 0 3 1
A isAbstract() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of PhpUnitGen.
5
 *
6
 * (c) 2017-2018 Paul Thébaud <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that was distributed with this source code.
10
 */
11
12
namespace PhpUnitGen\Model\PropertyTrait;
13
14
/**
15
 * Trait AbstractTrait.
16
 *
17
 * @author     Paul Thébaud <[email protected]>.
18
 * @copyright  2017-2018 Paul Thébaud <[email protected]>.
19
 * @license    https://opensource.org/licenses/MIT The MIT license.
20
 * @link       https://github.com/paul-thebaud/phpunit-generator
21
 * @since      Class available since Release 2.0.0.
22
 */
23
trait AbstractTrait
24
{
25
    /**
26
     * @var bool $isAbstract A boolean describing if it is abstract.
27
     */
28
    protected $isAbstract = false;
29
30
    /**
31
     * @param bool $isAbstract The new abstract value to set.
32
     */
33
    public function setIsAbstract(bool $isAbstract): void
34
    {
35
        $this->isAbstract = $isAbstract;
36
    }
37
38
    /**
39
     * @return bool True if it is abstract.
40
     */
41
    public function isAbstract(): bool
42
    {
43
        return $this->isAbstract;
44
    }
45
}
46