Completed
Push — master ( d2f081...a05bf8 )
by Andrii
03:19
created

BuilderContext::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace hiqdev\php\billing\tests\behat\bootstrap;
4
5
use Behat\Behat\Context\Context;
6
7
class BuilderContext implements Context
8
{
9
    private $builder;
10
11
    public function __construct(string $class = null)
12
    {
13
        $class = $class ?? FactoryBasedBuilder::class;
14
        $this->builder = new $class();
15
    }
16
17
    public function getBuilder()
18
    {
19
        return $this->builder;
20
    }
21
}
22