Completed
Push — master ( 65e840...33fe4c )
by Gabriel
03:16
created

RequestMock   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fetch() 0 7 2
1
<?php
2
3
namespace ThreePlCentral\Test;
4
5
use ThreePlCentral\Request;
6
use ThreePlCentral\ResponseInterface;
7
8
class RequestMock extends Request
9
{
10
    public function fetch(array $data): ResponseInterface
11
    {
12
        if ($this->getUrl() === 'http://www.JOI.com/schemas/ViaSub.WMS/FindOrders') {
13
            return new ResponseMock(file_get_contents(__DIR__ . '/../files/findOrders/response.xml'));
14
        }
15
        throw new \Exception;
16
    }
17
}
18