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