| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function generate(string $path, array $uriParameters = [], array $queryParameters = []): string |
||
| 32 | { |
||
| 33 | $uriParameters = $this->encodeUriParameters($uriParameters); |
||
| 34 | |||
| 35 | $uri = $this->baseUri . '/' . vsprintf(ltrim($path, '/'), $uriParameters); |
||
| 36 | |||
| 37 | if (!empty($queryParameters)) { |
||
| 38 | $uri .= '?' . http_build_query( |
||
| 39 | $queryParameters, |
||
| 40 | '', |
||
| 41 | '&', |
||
| 42 | PHP_QUERY_RFC3986 |
||
| 43 | ); |
||
| 44 | } |
||
| 45 | |||
| 46 | return $uri; |
||
| 47 | } |
||
| 61 |