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