Commit 0c516fd7 authored by Jacob Priddy's avatar Jacob Priddy 👌
Browse files

Fix code styles

parent f8f2e054
...@@ -6,17 +6,17 @@ use Carbon\Carbon; ...@@ -6,17 +6,17 @@ use Carbon\Carbon;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Source\Authorization\Permissions; use Source\Authorization\Permissions;
use Source\UseCases\Door\ScheduleEvents\EventsPresenter; use Source\UseCases\Door\ScheduleEvents\EventsPresenter;
use Source\UseCases\Schedules\ScheduleEvents\ApiPresenter as ScheduleEventsPresenter;
use Source\UseCases\Schedules\ScheduleGet\ScheduleGetUseCase; use Source\UseCases\Schedules\ScheduleGet\ScheduleGetUseCase;
use Source\UseCases\Schedules\ScheduleEvents\ScheduleEventsUseCase;
use Source\UseCases\Door\ScheduleEvents\ScheduleEventsUseCase as ScheduleDoorEventsUseCase;
use Source\UseCases\Schedules\SchedulesGet\SchedulesGetUseCase; use Source\UseCases\Schedules\SchedulesGet\SchedulesGetUseCase;
use Source\UseCases\Schedules\APIPresenter as ScheduleApiPresenter; use Source\UseCases\Schedules\APIPresenter as ScheduleApiPresenter;
use Source\UseCases\Schedules\ScheduleCreate\ScheduleCreateUseCase; use Source\UseCases\Schedules\ScheduleCreate\ScheduleCreateUseCase;
use Source\UseCases\Schedules\ScheduleDelete\ScheduleDeleteUseCase; use Source\UseCases\Schedules\ScheduleDelete\ScheduleDeleteUseCase;
use Source\UseCases\Schedules\ScheduleEvents\ScheduleEventsUseCase;
use Source\UseCases\Schedules\ScheduleUpdate\ScheduleUpdateUseCase; use Source\UseCases\Schedules\ScheduleUpdate\ScheduleUpdateUseCase;
use Source\UseCases\Schedules\SchedulesGet\APIPresenter as SchedulesGetApiPresenter; use Source\UseCases\Schedules\SchedulesGet\APIPresenter as SchedulesGetApiPresenter;
use Source\UseCases\Schedules\ScheduleEvents\ApiPresenter as ScheduleEventsPresenter;
use Source\UseCases\Schedules\ScheduleDelete\ApiPresenter as ScheduleDeleteApiPresenter; use Source\UseCases\Schedules\ScheduleDelete\ApiPresenter as ScheduleDeleteApiPresenter;
use Source\UseCases\Door\ScheduleEvents\ScheduleEventsUseCase as ScheduleDoorEventsUseCase;
/** /**
* @group Schedules Management * @group Schedules Management
......
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
namespace App\Http\Controllers\Web\Admin; namespace App\Http\Controllers\Web\Admin;
use Carbon\Carbon; use Carbon\Carbon;
use Illuminate\View\View; use Illuminate\View\View;
use Source\Sanitize\CastsTo;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Source\UseCases\Entries\WebPresenter; use Source\UseCases\Entries\WebPresenter;
use Source\UseCases\Entries\GetEntries\GetEntriesUseCase; use Source\UseCases\Entries\GetEntries\GetEntriesUseCase;
......
...@@ -3,22 +3,21 @@ ...@@ -3,22 +3,21 @@
namespace App\Http\Controllers\Web\Admin; namespace App\Http\Controllers\Web\Admin;
use Illuminate\View\View; use Illuminate\View\View;
use Source\Entities\Override; use Source\Entities\Override;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Validation\ValidationException; use Illuminate\Validation\ValidationException;
use Source\UseCases\Doors\GetDoors\GetDoorsUseCase; use Source\UseCases\Doors\GetDoors\GetDoorsUseCase;
use Source\UseCases\Overrides\OverrideUpdate\WebPresenter as OverrideUpdatePresenter;
use Source\UseCases\Overrides\OverrideUpdate\OverrideUpdateUseCase;
use Source\UseCases\Overrides\OverrideGet\WebPresenter as OverrideGetPresenter;
use Source\UseCases\Overrides\OverrideGet\OverrideGetUseCase; use Source\UseCases\Overrides\OverrideGet\OverrideGetUseCase;
use Source\UseCases\Overrides\OverridesGet\OverridesGetUseCase; use Source\UseCases\Overrides\OverridesGet\OverridesGetUseCase;
use Source\UseCases\Doors\GetDoors\MePresenter as GetDoorsPresenter;
use Source\UseCases\Overrides\OverrideCreate\OverrideCreateUseCase; use Source\UseCases\Overrides\OverrideCreate\OverrideCreateUseCase;
use Source\UseCases\Overrides\OverrideUpdate\OverrideUpdateUseCase;
use Source\UseCases\Doors\GetDoors\MePresenter as GetDoorsPresenter;
use Source\UseCases\Overrides\OverridesGet\WebPresenter as OverridesPresenter; use Source\UseCases\Overrides\OverridesGet\WebPresenter as OverridesPresenter;
use Source\UseCases\Overrides\OverrideGet\WebPresenter as OverrideGetPresenter;
use Source\UseCases\Overrides\OverrideCreate\WebPresenter as OverrideCreatePresenter; use Source\UseCases\Overrides\OverrideCreate\WebPresenter as OverrideCreatePresenter;
use Source\UseCases\Overrides\OverrideUpdate\WebPresenter as OverrideUpdatePresenter;
class OverridesController extends Controller class OverridesController extends Controller
{ {
......
...@@ -3,16 +3,15 @@ ...@@ -3,16 +3,15 @@
namespace App\Http\Controllers\Web\Admin; namespace App\Http\Controllers\Web\Admin;
use Illuminate\View\View; use Illuminate\View\View;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Source\UseCases\Requests\InteractWithRequest\WebPresenter as RequestInteractorPresenter;
use Source\UseCases\Requests\GetRequests\WebPresenter as RequestsPresenter;
use Source\UseCases\Requests\GetRequests\GetRequestsUseCase; use Source\UseCases\Requests\GetRequests\GetRequestsUseCase;
use Source\UseCases\Requests\DeleteRequest\DeleteRequestUseCase; use Source\UseCases\Requests\DeleteRequest\DeleteRequestUseCase;
use Source\UseCases\Requests\GetRequests\WebPresenter as RequestsPresenter;
use Source\UseCases\Requests\InteractWithRequest\InteractWithRequestUseCase; use Source\UseCases\Requests\InteractWithRequest\InteractWithRequestUseCase;
use Source\UseCases\Requests\DeleteRequest\WebPresenter as DeleteRequestPresenter; use Source\UseCases\Requests\DeleteRequest\WebPresenter as DeleteRequestPresenter;
use Source\UseCases\Requests\InteractWithRequest\WebPresenter as RequestInteractorPresenter;
class RequestsController extends Controller class RequestsController extends Controller
{ {
......
...@@ -3,21 +3,20 @@ ...@@ -3,21 +3,20 @@
namespace App\Http\Controllers\Web\Admin; namespace App\Http\Controllers\Web\Admin;
use Illuminate\View\View; use Illuminate\View\View;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Validation\ValidationException; use Illuminate\Validation\ValidationException;
use Source\UseCases\Schedules\ScheduleGet\ScheduleGetUseCase; use Source\UseCases\Schedules\ScheduleGet\ScheduleGetUseCase;
use Source\UseCases\Schedules\APIPresenter as SchedulePresenter;
use Source\UseCases\Schedules\SchedulesGet\SchedulesGetUseCase; use Source\UseCases\Schedules\SchedulesGet\SchedulesGetUseCase;
use Source\UseCases\Schedules\ScheduleDelete\ScheduleDeleteUseCase; use Source\UseCases\Schedules\APIPresenter as SchedulePresenter;
use Source\UseCases\Schedules\ScheduleCreate\ScheduleCreateUseCase; use Source\UseCases\Schedules\ScheduleCreate\ScheduleCreateUseCase;
use Source\UseCases\Schedules\ScheduleDelete\ScheduleDeleteUseCase;
use Source\UseCases\Schedules\ScheduleUpdate\ScheduleUpdateUseCase; use Source\UseCases\Schedules\ScheduleUpdate\ScheduleUpdateUseCase;
use Source\UseCases\Schedules\SchedulesGet\WebPresenter as SchedulesPresenter; use Source\UseCases\Schedules\SchedulesGet\WebPresenter as SchedulesPresenter;
use Source\UseCases\Schedules\ScheduleUpdate\WebPresenter as ScheduleUpdatePresenter;
use Source\UseCases\Schedules\ScheduleDelete\ApiPresenter as DeleteSchedulePresenter;
use Source\UseCases\Schedules\ScheduleCreate\WebPresenter as ScheduleCreatePresenter; use Source\UseCases\Schedules\ScheduleCreate\WebPresenter as ScheduleCreatePresenter;
use Source\UseCases\Schedules\ScheduleDelete\ApiPresenter as DeleteSchedulePresenter;
use Source\UseCases\Schedules\ScheduleUpdate\WebPresenter as ScheduleUpdatePresenter;
class SchedulesController extends Controller class SchedulesController extends Controller
{ {
......
...@@ -3,22 +3,21 @@ ...@@ -3,22 +3,21 @@
namespace App\Http\Controllers\Web\Admin; namespace App\Http\Controllers\Web\Admin;
use Illuminate\View\View; use Illuminate\View\View;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Source\Exceptions\EntityNotFoundException;
use Illuminate\Validation\ValidationException; use Illuminate\Validation\ValidationException;
use Source\UseCases\Tokens\UpdateToken\WebPresenter; use Source\Exceptions\EntityNotFoundException;
use Source\UseCases\Tokens\UpdateToken\UpdateTokenUseCase;
use Source\UseCases\Tokens\GetToken\WebPresenter as GetTokenPresenter;
use Source\UseCases\Tokens\GetToken\GetTokenUseCase; use Source\UseCases\Tokens\GetToken\GetTokenUseCase;
use Source\UseCases\Tokens\ExpireToken\APIPresenter as ExpireTokenPresenter; use Source\UseCases\Tokens\UpdateToken\WebPresenter;
use Source\UseCases\Tokens\ExpireToken\ExpireTokenUseCase;
use Source\UseCases\Tokens\CreateToken\WebPresenter as CreateTokenPresenter;
use Source\UseCases\Tokens\GetTokens\GetTokensUseCase; use Source\UseCases\Tokens\GetTokens\GetTokensUseCase;
use Source\UseCases\Tokens\CreateToken\CreateTokenUseCase; use Source\UseCases\Tokens\CreateToken\CreateTokenUseCase;
use Source\UseCases\Tokens\ExpireToken\ExpireTokenUseCase;
use Source\UseCases\Tokens\UpdateToken\UpdateTokenUseCase;
use Source\UseCases\Tokens\GetToken\WebPresenter as GetTokenPresenter;
use Source\UseCases\Tokens\GetTokens\WebAdminPresenter as TokensPresenter; use Source\UseCases\Tokens\GetTokens\WebAdminPresenter as TokensPresenter;
use Source\UseCases\Tokens\CreateToken\WebPresenter as CreateTokenPresenter;
use Source\UseCases\Tokens\ExpireToken\APIPresenter as ExpireTokenPresenter;
class TokensController extends Controller class TokensController extends Controller
{ {
......
...@@ -7,13 +7,13 @@ use App\Http\Controllers\Controller; ...@@ -7,13 +7,13 @@ use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Source\Exceptions\DeleteFailedException; use Source\Exceptions\DeleteFailedException;
use Source\Exceptions\AuthorizationException; use Source\Exceptions\AuthorizationException;
use Source\UseCases\Doors\GetDoors\MePresenter as DoorsPresenter;
use Source\UseCases\Users\GetUser\GetUserUseCase; use Source\UseCases\Users\GetUser\GetUserUseCase;
use Source\UseCases\Users\GetUsers\GetUsersUseCase;
use Source\UseCases\Doors\GetDoors\GetDoorsUseCase; use Source\UseCases\Doors\GetDoors\GetDoorsUseCase;
use Source\UseCases\Users\GetUsers\GetUsersUseCase;
use Source\UseCases\Users\CreateUser\CreateUserUseCase; use Source\UseCases\Users\CreateUser\CreateUserUseCase;
use Source\UseCases\Users\DeleteUser\DeleteUserUseCase; use Source\UseCases\Users\DeleteUser\DeleteUserUseCase;
use Source\UseCases\Users\UpdateUser\UpdateUserUseCase; use Source\UseCases\Users\UpdateUser\UpdateUserUseCase;
use Source\UseCases\Doors\GetDoors\MePresenter as DoorsPresenter;
use Source\UseCases\Users\GetUser\WebPresenter as GetUserPresenter; use Source\UseCases\Users\GetUser\WebPresenter as GetUserPresenter;
use Source\UseCases\Users\GetUsers\WebPresenter as GetUsersPresenter; use Source\UseCases\Users\GetUsers\WebPresenter as GetUsersPresenter;
use Source\UseCases\Users\CreateUser\WebPresenter as CreateUserPresenter; use Source\UseCases\Users\CreateUser\WebPresenter as CreateUserPresenter;
......
...@@ -11,10 +11,10 @@ use App\Http\Controllers\Web\Admin\UsersController; ...@@ -11,10 +11,10 @@ use App\Http\Controllers\Web\Admin\UsersController;
use App\Http\Controllers\Web\Admin\GroupsController; use App\Http\Controllers\Web\Admin\GroupsController;
use App\Http\Controllers\Web\Admin\TokensController; use App\Http\Controllers\Web\Admin\TokensController;
use App\Http\Controllers\Web\Admin\EntriesController; use App\Http\Controllers\Web\Admin\EntriesController;
use App\Http\Controllers\Web\Admin\RequestsController;
use App\Http\Controllers\Web\Admin\AttemptsController; use App\Http\Controllers\Web\Admin\AttemptsController;
use App\Http\Controllers\Web\Admin\SchedulesController; use App\Http\Controllers\Web\Admin\RequestsController;
use App\Http\Controllers\Web\Admin\OverridesController; use App\Http\Controllers\Web\Admin\OverridesController;
use App\Http\Controllers\Web\Admin\SchedulesController;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -15,7 +15,7 @@ class APIPresenter extends BasePresenter implements Presenter ...@@ -15,7 +15,7 @@ class APIPresenter extends BasePresenter implements Presenter
/** @inheritDoc */ /** @inheritDoc */
public function present(ResponseModel $responseModel): void public function present(ResponseModel $responseModel): void
{ {
$this->entries = array_map(fn(Entry $entry): array => self::formatEntry($entry), $responseModel->getEntries()); $this->entries = array_map(fn (Entry $entry): array => self::formatEntry($entry), $responseModel->getEntries());
} }
/** @inheritDoc */ /** @inheritDoc */
......
...@@ -15,7 +15,7 @@ class ApiPresenter extends BasePresenter implements Presenter ...@@ -15,7 +15,7 @@ class ApiPresenter extends BasePresenter implements Presenter
/** @inheritDoc */ /** @inheritDoc */
public function present(ResponseModel $responseModel): void public function present(ResponseModel $responseModel): void
{ {
$this->overrides = array_map(fn(Override $override): array => self::formatOverride($override), $responseModel->getOverrides()); $this->overrides = array_map(fn (Override $override): array => self::formatOverride($override), $responseModel->getOverrides());
} }
/** @inheritDoc */ /** @inheritDoc */
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
namespace Source\UseCases\Schedules\ScheduleEvents; namespace Source\UseCases\Schedules\ScheduleEvents;
use Source\Entities\Schedule; use Source\Entities\Schedule;
use Source\UseCases\BasePresenter;
use Source\Entities\ScheduleEvent; use Source\Entities\ScheduleEvent;
use Source\UseCases\BasePresenter;
class ApiPresenter extends BasePresenter implements Presenter class ApiPresenter extends BasePresenter implements Presenter
{ {
......
...@@ -56,7 +56,8 @@ class ScheduleEvents implements ScheduleEventsUseCase ...@@ -56,7 +56,8 @@ class ScheduleEvents implements ScheduleEventsUseCase
$eventEnd = $schedule->addDuration($eventStart); $eventEnd = $schedule->addDuration($eventStart);
$response->addEvent(new ScheduleEvent( $response->addEvent(new ScheduleEvent(
$eventStart, $eventEnd $eventStart,
$eventEnd
)); ));
} }
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
namespace Source\UseCases\Schedules\ScheduleEvents; namespace Source\UseCases\Schedules\ScheduleEvents;
use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Support\DeferrableProvider; use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
/** /**
* Service provider must be registered in AppServiceProvider * Service provider must be registered in AppServiceProvider
......
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