| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function register(string $username, string $email, string $password): bool |
||
| 40 | { |
||
| 41 | $method = HttpMethod::POST(); |
||
| 42 | $body = json_encode( |
||
| 43 | [ |
||
| 44 | 'username' => $username, |
||
| 45 | 'password' => $password, |
||
| 46 | 'email' => $email |
||
| 47 | ] |
||
| 48 | ); |
||
| 49 | $url = self::URL_REGISTER; |
||
| 50 | |||
| 51 | $response = $this->transport->prepare($method, $url, $body)->send(); |
||
| 52 | |||
| 53 | return $response->code == 201; |
||
| 54 | } |
||
| 55 | } |