| Total Complexity | 5 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class AuthRequest implements RequestInterface, ResponseHandlerAwareInterface |
||
| 10 | { |
||
| 11 | private string $login; |
||
| 12 | |||
| 13 | private string $password; |
||
| 14 | |||
| 15 | 1 | public function __construct(string $login, string $password) |
|
| 16 | { |
||
| 17 | 1 | $this->login = $login; |
|
| 18 | 1 | $this->password = $password; |
|
| 19 | 1 | } |
|
| 20 | |||
| 21 | 1 | public function getPath(): string |
|
| 24 | } |
||
| 25 | |||
| 26 | 1 | public function getBody(): string |
|
| 27 | { |
||
| 28 | 1 | return json_encode([ |
|
| 29 | 1 | 'login' => $this->login, |
|
| 30 | 1 | 'password' => $this->password |
|
| 31 | 1 | ], JSON_THROW_ON_ERROR); |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | public function getMethod(): string |
|
| 37 | } |
||
| 38 | |||
| 39 | 1 | public function getResponseHandler(): ResponseHandlerInterface |
|
| 42 | } |
||
| 43 | } |
||
| 44 |