| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | */ |
||
| 20 | 12 | public function process(RequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
| 21 | { |
||
| 22 | 12 | return $handler->handle($this->withSoapHeader($request)); |
|
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param RequestInterface $request |
||
| 27 | * |
||
| 28 | * @return RequestInterface |
||
| 29 | * @throws RequestException |
||
| 30 | */ |
||
| 31 | 12 | private function withSoapHeader(RequestInterface $request): RequestInterface |
|
| 32 | { |
||
| 33 | 12 | $request->getBody()->rewind(); |
|
| 34 | |||
| 35 | 12 | $xml = new SimpleXMLElement($request->getBody()->getContents()); |
|
| 36 | |||
| 37 | 12 | $query = '//*[local-name()="Action" and namespace-uri()="http://schemas.xmlsoap.org/ws/2004/08/addressing"]'; |
|
| 50 | } |