Commit 06cdb4d0 authored by Jacob Priddy's avatar Jacob Priddy 👌
Browse files

fix code styles

parent 9470d634
......@@ -46,11 +46,13 @@ abstract class ApiController extends Controller
{
return response()->json(
array_merge(
$data, [
$data,
[
'status' => 'success',
'code' => $this->status,
]
), $this->status
),
$this->status
);
}
......
......@@ -5,16 +5,16 @@ namespace App\Http\Controllers;
use Illuminate\Http\JsonResponse;
use Source\Authorization\Permissions;
use Source\Exceptions\DeleteFailedException;
use Source\UseCases\Groups\UpdateGroup\APIPresenter as UpdateGroupAPIPresenter;
use Source\UseCases\Groups\UpdateGroup\UpdateGroupUseCase;
use Source\UseCases\Groups\GetGroup\APIPresenter as GetGroupAPIPresenter;
use Source\UseCases\Groups\GetGroup\GetGroupUseCase;
use Source\UseCases\Groups\DeleteGroup\DeleteGroupUseCase;
use Source\UseCases\Groups\CreateGroup\CreateGroupUseCase;
use Source\UseCases\Groups\DeleteGroup\DeleteGroupUseCase;
use Source\UseCases\Groups\UpdateGroup\UpdateGroupUseCase;
use Source\UseCases\Groups\GetAllGroups\GetAllGroupsUseCase;
use Source\UseCases\Groups\GetGroup\APIPresenter as GetGroupAPIPresenter;
use Source\UseCases\Groups\GetAllGroups\APIPresenter as AllGroupsAPIPresenter;
use Source\UseCases\Groups\DeleteGroup\APIPresenter as DeleteGroupAPIPresenter;
use Source\UseCases\Groups\CreateGroup\APIPresenter as CreateGroupAPIPresenter;
use Source\UseCases\Groups\DeleteGroup\APIPresenter as DeleteGroupAPIPresenter;
use Source\UseCases\Groups\UpdateGroup\APIPresenter as UpdateGroupAPIPresenter;
class GroupsController extends ApiController
{
......
......@@ -3,8 +3,8 @@
namespace Source\UseCases\Groups\CreateGroup;
use Source\Entities\Group;
use Source\Gateways\Groups\GroupsRepository;
use Source\Exceptions\EntityExistsException;
use Source\Gateways\Groups\GroupsRepository;
class CreateGroup implements CreateGroupUseCase
{
......
......@@ -3,10 +3,10 @@
namespace Source\UseCases\Groups\CreateGroup;
use Illuminate\Support\ServiceProvider;
use Source\Gateways\Groups\GroupsRepository;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
/**
* Service provider must be registered in AppServiceProvider
......
......@@ -2,8 +2,8 @@
namespace Source\UseCases\Groups\DeleteGroup;
use Source\Gateways\Groups\GroupsRepository;
use Source\Exceptions\DeleteFailedException;
use Source\Gateways\Groups\GroupsRepository;
class DeleteGroup implements DeleteGroupUseCase
{
......
......@@ -3,10 +3,10 @@
namespace Source\UseCases\Groups\DeleteGroup;
use Illuminate\Support\ServiceProvider;
use Source\Gateways\Groups\GroupsRepository;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
/**
* Service provider must be registered in AppServiceProvider
......
......@@ -3,10 +3,10 @@
namespace Source\UseCases\Groups\GetAllGroups;
use Illuminate\Support\ServiceProvider;
use Source\Gateways\Groups\GroupsRepository;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
/**
* Service provider must be registered in AppServiceProvider
......
......@@ -3,10 +3,10 @@
namespace Source\UseCases\Groups\GetGroup;
use Illuminate\Support\ServiceProvider;
use Source\Gateways\Groups\GroupsRepository;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
/**
* Service provider must be registered in AppServiceProvider
......
......@@ -3,10 +3,10 @@
namespace Source\UseCases\Groups\UpdateGroup;
use Illuminate\Support\ServiceProvider;
use Source\Gateways\Groups\GroupsRepository;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
/**
* Service provider must be registered in AppServiceProvider
......
......@@ -28,7 +28,8 @@ class CreateGroupApiTest extends AuthenticatesWithApplicationTestCase
*/
protected function handleTest(array $data): void
{
$this->response = $this->postJson('/groups',
$this->response = $this->postJson(
'/groups',
array_merge(
['api_token' => $this->authToken],
$data
......
......@@ -34,7 +34,8 @@ class UpdateGroupApiTest extends AuthenticatesWithApplicationTestCase
*/
protected function handleTest(string $groupId, array $data): void
{
$this->response = $this->putJson('/groups/' . $groupId,
$this->response = $this->putJson(
'/groups/' . $groupId,
array_merge(['api_token' => $this->authToken], $data)
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment