AssemblerAbstract   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 10
c 0
b 0
f 0
ccs 0
cts 5
cp 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getBuilder() 0 4 1
A setBuilder() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * This file is part of phpDocumentor.
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @author    Mike van Riel <[email protected]>
11
 * @copyright 2010-2018 Mike van Riel / Naenius (http://www.naenius.com)
12
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
13
 * @link      http://phpdoc.org
14
 */
15
16
namespace phpDocumentor\Descriptor\Builder;
17
18
use phpDocumentor\Descriptor\ProjectDescriptorBuilder;
19
20
/**
21
 * Base class for all assemblers.
22
 */
23
abstract class AssemblerAbstract implements AssemblerInterface
24
{
25
    /** @var ProjectDescriptorBuilder|null $builder */
26
    protected $builder;
27
28
    /**
29
     * Returns the builder for this Assembler or null if none is set.
30
     *
31
     * @return null|ProjectDescriptorBuilder
32
     */
33
    public function getBuilder()
34
    {
35
        return $this->builder;
36
    }
37
38
    /**
39
     * Registers the Builder with this Assembler.
40
     *
41
     * The Builder may be used to recursively assemble Descriptors using
42
     * the {@link ProjectDescriptorBuilder::buildDescriptor()} method.
43
     */
44
    public function setBuilder(ProjectDescriptorBuilder $builder)
45
    {
46
        $this->builder = $builder;
47
    }
48
}
49