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

BaseContext   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 10
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getBuilder() 0 3 1
1
<?php
2
3
namespace hiqdev\php\billing\tests\behat\bootstrap;
4
5
use Behat\Behat\Context\Context;
6
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
7
8
abstract class BaseContext implements Context
9
{
10
    protected $builder;
11
12
    /**
13
     * @BeforeScenario
14
     */
15
    public function getBuilder(BeforeScenarioScope $scope)
16
    {
17
        $this->builder = $scope->getEnvironment()->getContext(BuilderContext::class)->getBuilder();
0 ignored issues
show
Bug introduced by
The method getContext() does not exist on Behat\Testwork\Environment\Environment. It seems like you code against a sub-type of Behat\Testwork\Environment\Environment such as Behat\Behat\Context\Envi...lizedContextEnvironment or Behat\Behat\Context\Envi...lizedContextEnvironment. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
        $this->builder = $scope->getEnvironment()->/** @scrutinizer ignore-call */ getContext(BuilderContext::class)->getBuilder();
Loading history...
18
    }
19
}
20