Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function createRequest() |
||
27 | { |
||
28 | $headers = $this->getHeaders(); |
||
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(file_get_contents('php://input'), $this->secret, $headers[Client::HEADER_SIGNATURE], $headers[Client::HEADER_SIGNATURE_ALGORITHM]); |
||
39 | } |
||
40 | |||
64 |