Completed
Push — master ( d44a4d...4aa695 )
by Iman
09:02
created

IsRespondedWith   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 22
rs 10
c 0
b 0
f 0

3 Methods

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