Re-organise the src and tests directories

This commit is contained in:
Oliver Davies 2020-06-11 20:21:51 +01:00
parent ae766763b2
commit b238e6655a
26 changed files with 13 additions and 13 deletions

View file

@ -1,30 +0,0 @@
<?php
declare(strict_types=1);
namespace Opdavies\Glassboxx\Request;
use RuntimeException;
final class AuthTokenRequest extends AbstractRequest implements AuthTokenRequestInterface
{
public function getToken(): string
{
if (!$this->config) {
throw new RuntimeException('There is no config');
}
$response = $this->client->request(
'POST',
self::ENDPOINT,
[
'query' => [
'password' => $this->config->getPassword(),
'username' => $this->config->getUsername(),
],
]
);
return json_decode($response->getContent());
}
}