Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function createRequest($body, array $headers) |
||
29 | { |
||
30 | if (!isset($headers[Client::HEADER_SIGNATURE])) { |
||
31 | throw new RequestException(sprintf('Missing %s header in HTTP request', Client::HEADER_SIGNATURE)); |
||
32 | } |
||
33 | |||
34 | if (!isset($headers[Client::HEADER_SIGNATURE_ALGORITHM])) { |
||
35 | throw new RequestException(sprintf('Missing %s header in HTTP request', Client::HEADER_SIGNATURE_ALGORITHM)); |
||
36 | } |
||
37 | |||
38 | return new Request($body, $this->secret, $headers[Client::HEADER_SIGNATURE], $headers[Client::HEADER_SIGNATURE_ALGORITHM]); |
||
39 | } |
||
40 | |||
42 |