| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 53 | public function send(RequestInterface $request) |
||
| 54 | { |
||
| 55 | $requestUrl = strval($request->getUri()); |
||
| 56 | if ($this->url !== null |
||
| 57 | && substr($requestUrl, 0, strlen(TransportInterface::DEFAULT_URL)) === TransportInterface::DEFAULT_URL |
||
| 58 | ) { |
||
| 59 | // Replacing |
||
| 60 | $request = $request->withUri( |
||
| 61 | new Uri(str_replace(TransportInterface::DEFAULT_URL, $this->url, $requestUrl)) |
||
| 62 | ); |
||
| 63 | } |
||
| 64 | |||
| 65 | return $this->transport->send($request); |
||
| 66 | } |
||
| 67 | } |
||
| 68 |