Completed
Push — master ( ea522c...375169 )
by Korotkov
04:17
created

Master::getBuilder()   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
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author    : Korotkov Danila <[email protected]>
7
 * @license   https://mit-license.org/ MIT
8
 */
9
10
namespace Creational\Builder;
11
12
/**
13
 * Class Director
14
 * @package Creational\Builder
15
 */
16
class Master
17
{
18
19
    /**
20
     * @var BuilderInterface
21
     */
22
    protected $builder;
23
24
    /**
25
     * Master constructor.
26
     * @param BuilderInterface $builder
27
     */
28
    public function __construct(BuilderInterface $builder)
29
    {
30
        $this->builder = $builder;
31
    }
32
33
    /**
34
     * @return AbstractComputer
35
     */
36
    public function build(): AbstractComputer
37
    {
38
        return $this->builder->getComputer();
39
    }
40
41
    /**
42
     * @return BuilderInterface
43
     */
44
    public function getBuilder(): BuilderInterface
45
    {
46
        return $this->builder;
47
    }
48
}
49