| Total Complexity | 3 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class UserRequest extends AbstractRequest implements QueryRequestInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $fields; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * UserRequest constructor. |
||
| 19 | * |
||
| 20 | 1 | * @param string $path |
|
| 21 | * @param array $fields |
||
| 22 | 1 | */ |
|
| 23 | public function __construct(string $path, array $fields) |
||
| 28 | } |
||
| 29 | 1 | ||
| 30 | /** |
||
| 31 | 1 | * @param string|null $method |
|
| 32 | * |
||
| 33 | 1 | * @return RequestInterface |
|
| 34 | */ |
||
| 35 | public function build(?string $method = null): RequestInterface |
||
| 36 | { |
||
| 37 | return $this->origin |
||
| 38 | 1 | ->withUri(Uri::fromParts(['query' => $this->buildQuery()])); |
|
| 39 | } |
||
| 40 | 1 | ||
| 41 | /** |
||
| 42 | 1 | * @return string |
|
| 43 | */ |
||
| 44 | 1 | public function buildQuery(): string |
|
| 53 | } |
||
| 54 | } |
||
| 55 |