Completed
Push — master ( 33dce2...bb9f86 )
by Iman
09:07
created

Chain   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 13
dl 0
loc 37
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A http() 0 7 1
A __construct() 0 3 1
A __destruct() 0 3 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\MakeSure;
4
5
class Chain
6
{
7
    private $phpunit;
8
9
    public function __construct($phpunit)
10
    {
11
        $this->phpunit = $phpunit;
12
    }
13
14
    public $http = [];
15
16
    public $assertion = [];
17
18
    public $event;
19
20
    public $exception;
21
22
23
    public function __destruct()
24
    {
25
        (new CheckExpectations($this, $this->phpunit))->check();
26
    }
27
28
29
    /**
30
     * @param $uri
31
     * @param array $data
32
     * @param array $headers
33
     * @param $str
34
     */
35
    public function http($uri, array $data, array $headers, $str)
36
    {
37
        $this->http = [
38
            'method'  => $str,
39
            'url'     => $uri,
40
            'data'    => $data,
41
            'headers' => $headers,
42
        ];
43
    }
44
}