InitializationTracker::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProxyManager\ProxyGenerator\LazyLoadingGhost\PropertyGenerator;
6
7
use Laminas\Code\Generator\Exception\InvalidArgumentException;
8
use Laminas\Code\Generator\PropertyGenerator;
9
use ProxyManager\Generator\Util\IdentifierSuffixer;
10
11
/**
12
 * Property that contains the initializer for a lazy object
13
 */
14
class InitializationTracker extends PropertyGenerator
15
{
16
    /**
17
     * Constructor
18
     *
19
     * @throws InvalidArgumentException
20
     */
21
    public function __construct()
22 2
    {
23
        parent::__construct(IdentifierSuffixer::getIdentifier('initializationTracker'));
24 2
25
        $this->setVisibility(self::VISIBILITY_PRIVATE);
26 2
        $this->setDocBlock('@var bool tracks initialization status - true while the object is initializing');
27 2
        $this->setDefaultValue(false);
28 2
    }
29
}
30