Conditions | 2 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | 39 | public function execute(JobBase $job) : JobResult |
|
31 | { |
||
32 | 39 | $mapper = $this->factory->getJobMapper($job); |
|
33 | |||
34 | 39 | $mapResult = $mapper->map($job); |
|
35 | |||
36 | try { |
||
37 | 39 | $res = $this->client->request( |
|
38 | 39 | $mapResult->getMethod(), |
|
39 | 39 | $this->factory->getConfig()->getUrl().$mapResult->getUrl(), |
|
40 | 39 | $mapResult->getConfig() |
|
41 | ); |
||
42 | |||
43 | 36 | return new JobResult($res); |
|
44 | 7 | } catch (ClientException $e) { |
|
45 | 7 | return JobResult::populateFromClientException($e); |
|
46 | } |
||
47 | } |
||
48 | } |
||
49 |