IsRespondedWith::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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