php cs fixer

This commit is contained in:
nobohan 2021-12-13 11:07:30 +01:00
parent 8493a64794
commit 4b432c64b0
2 changed files with 30 additions and 29 deletions

View File

@ -17,27 +17,6 @@ use Symfony\Component\Routing\Annotation\Route;
class UserApiController extends ApiController
{
/**
* @Route(
* "/api/1.0/main/whoami.{_format}",
* name="chill_main_user_whoami",
* requirements={
* "_format": "json"
* }
* )
*
* @param mixed $_format
*/
public function whoami($_format): JsonResponse
{
return $this->json(
$this->getUser(),
JsonResponse::HTTP_OK,
[],
['groups' => ['read']]
);
}
/**
* @Route(
* "/api/1.0/main/user-current-location.{_format}",
@ -58,4 +37,25 @@ class UserApiController extends ApiController
['groups' => ['read']]
);
}
/**
* @Route(
* "/api/1.0/main/whoami.{_format}",
* name="chill_main_user_whoami",
* requirements={
* "_format": "json"
* }
* )
*
* @param mixed $_format
*/
public function whoami($_format): JsonResponse
{
return $this->json(
$this->getUser(),
JsonResponse::HTTP_OK,
[],
['groups' => ['read']]
);
}
}

View File

@ -55,14 +55,6 @@ final class UserApiControllerTest extends WebTestCase
return $data['results'][0];
}
public function testWhoami()
{
$client = $this->getClientAuthenticated();
$client->request(Request::METHOD_GET, '/api/1.0/main/whoami.json');
$this->assertResponseIsSuccessful();
}
public function testUserCurrentLocation()
{
$client = $this->getClientAuthenticated();
@ -71,4 +63,13 @@ final class UserApiControllerTest extends WebTestCase
$this->assertResponseIsSuccessful();
}
public function testWhoami()
{
$client = $this->getClientAuthenticated();
$client->request(Request::METHOD_GET, '/api/1.0/main/whoami.json');
$this->assertResponseIsSuccessful();
}
}