Pizza   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 40
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
declare(strict_types=1);
3
4
namespace codenixsv\Patterns\Creational\Builder;
5
6
/**
7
 * Class Pizza
8
 * @package codenixsv\Patterns\Creational\Builder
9
 */
10
class Pizza
11
{
12
    /**
13
     * @var bool
14
     */
15
    private $peperoni;
16
17
    /**
18
     * @var bool
19
     */
20
    private $tomato;
21
22
    /**
23
     * @var bool
24
     */
25
    private $anchovy;
26
27
    /**
28
     * @var bool
29
     */
30
    private $mozzarella;
31
32
    /**
33
     * @var bool
34
     */
35
    private $salami;
36
37
    /**
38
     * Pizza constructor.
39
     * @param PizzaBuilder $builder
40
     */
41 1
    public function __construct(PizzaBuilder $builder)
42
    {
43 1
        $this->peperoni = $builder->peperoni;
44 1
        $this->tomato = $builder->tomato;
45 1
        $this->anchovy = $builder->anchovy;
46 1
        $this->mozzarella = $builder->mozzarella;
47 1
        $this->salami = $builder->salami;
48 1
    }
49
}
50