Conditions | 2 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
25 | 8 | public function send($filename, $content) |
|
26 | { |
||
27 | 8 | $client = $this->getClient(); |
|
28 | 8 | $result = new SummaryResult(); |
|
29 | |||
30 | try { |
||
31 | $params = [ |
||
32 | 8 | 'fileName' => $filename, |
|
33 | 8 | 'contentFile' => $content, |
|
34 | 8 | ]; |
|
35 | 8 | $response = $client->call('sendSummary', [ 'parameters' => $params ]); |
|
36 | $result |
||
37 | 4 | ->setTicket($response->ticket) |
|
38 | 4 | ->setSuccess(true); |
|
39 | } |
||
40 | 8 | catch (\SoapFault $e) { |
|
41 | 4 | $result->setError($this->getErrorFromFault($e)); |
|
42 | } |
||
43 | 8 | return $result; |
|
44 | } |
||
45 | } |