IsRespondedWith   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 27
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isRespondedWith() 0 4 1
A isOk() 0 4 1
1
<?php
2
3
namespace Imanghafoori\MakeSure;
4
5
use Imanghafoori\MakeSure\Expectations\Response;
6
7
class IsRespondedWith
8
{
9
    /**
10
     * @var \Imanghafoori\MakeSure\Chain
11
     */
12
    private $chain;
13
14
    /**
15
     * IsRespondedWith constructor.
16
     *
17
     * @param $chain
18
     */
19 11
    public function __construct(Chain $chain)
20
    {
21 11
        $this->chain = $chain;
22 11
    }
23
24 2
    public function isRespondedWith(): Response
25
    {
26 2
        return new Response($this->chain);
27
    }
28
29 1
    public function isOk()
30
    {
31 1
        $this->chain->data['assertion'][] = ['assertSuccessful', null];
32 1
    }
33
}
34