diff --git a/app/Console/Commands/User/DisableTwoFactorCommand.php b/app/Console/Commands/User/DisableTwoFactorCommand.php index c45a5968e..44ff08356 100644 --- a/app/Console/Commands/User/DisableTwoFactorCommand.php +++ b/app/Console/Commands/User/DisableTwoFactorCommand.php @@ -15,7 +15,6 @@ class DisableTwoFactorCommand extends Command * Handle command execution process. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function handle() { diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 8af3848e0..38f49c8ff 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,7 +2,6 @@ namespace App\Exceptions; -use Exception; use Illuminate\Support\Arr; use Illuminate\Support\Str; use Illuminate\Http\JsonResponse; @@ -19,7 +18,6 @@ use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Database\Eloquent\ModelNotFoundException; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\Mailer\Exception\TransportException; -use App\Exceptions\Repository\RecordNotFoundException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; @@ -40,7 +38,6 @@ class Handler extends ExceptionHandler AuthorizationException::class, HttpException::class, ModelNotFoundException::class, - RecordNotFoundException::class, TokenMismatchException::class, ValidationException::class, ]; diff --git a/app/Exceptions/Repository/RecordNotFoundException.php b/app/Exceptions/Repository/RecordNotFoundException.php deleted file mode 100644 index 990e591d8..000000000 --- a/app/Exceptions/Repository/RecordNotFoundException.php +++ /dev/null @@ -1,25 +0,0 @@ -name)), '-'); @@ -44,7 +41,6 @@ class EggShareController extends Controller * Import a new egg using an XML file. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException * @throws \App\Exceptions\Service\Egg\BadJsonFormatException * @throws \App\Exceptions\Service\InvalidFileUploadException */ @@ -60,7 +56,6 @@ class EggShareController extends Controller * Update an existing Egg using a new imported file. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException * @throws \App\Exceptions\Service\Egg\BadJsonFormatException * @throws \App\Exceptions\Service\InvalidFileUploadException */ diff --git a/app/Http/Controllers/Admin/Eggs/EggVariableController.php b/app/Http/Controllers/Admin/Eggs/EggVariableController.php index 61e221874..db4987471 100644 --- a/app/Http/Controllers/Admin/Eggs/EggVariableController.php +++ b/app/Http/Controllers/Admin/Eggs/EggVariableController.php @@ -56,7 +56,6 @@ class EggVariableController extends Controller * * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException * @throws \App\Exceptions\Service\Egg\Variable\ReservedVariableNameException */ public function update(EggVariableFormRequest $request, Egg $egg, EggVariable $variable): RedirectResponse diff --git a/app/Http/Controllers/Admin/MountController.php b/app/Http/Controllers/Admin/MountController.php index 51f439c93..3a96f6552 100644 --- a/app/Http/Controllers/Admin/MountController.php +++ b/app/Http/Controllers/Admin/MountController.php @@ -38,7 +38,6 @@ class MountController extends Controller /** * Return the mount view page. * - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function view(string $id): View { diff --git a/app/Http/Controllers/Admin/NodesController.php b/app/Http/Controllers/Admin/NodesController.php index 4412aab6e..deda130f8 100644 --- a/app/Http/Controllers/Admin/NodesController.php +++ b/app/Http/Controllers/Admin/NodesController.php @@ -66,7 +66,6 @@ class NodesController extends Controller * * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function updateSettings(NodeFormRequest $request, Node $node): RedirectResponse { @@ -127,7 +126,6 @@ class NodesController extends Controller * Sets an alias for a specific allocation on a node. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function allocationSetAlias(AllocationAliasFormRequest $request): \Symfony\Component\HttpFoundation\Response { diff --git a/app/Http/Controllers/Admin/Servers/CreateServerController.php b/app/Http/Controllers/Admin/Servers/CreateServerController.php index d765bb865..977706d4d 100644 --- a/app/Http/Controllers/Admin/Servers/CreateServerController.php +++ b/app/Http/Controllers/Admin/Servers/CreateServerController.php @@ -27,7 +27,6 @@ class CreateServerController extends Controller /** * Displays the create server page. * - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function index(): View|RedirectResponse { diff --git a/app/Http/Controllers/Admin/Servers/ServerViewController.php b/app/Http/Controllers/Admin/Servers/ServerViewController.php index 8e5c0f2b8..4a6758769 100644 --- a/app/Http/Controllers/Admin/Servers/ServerViewController.php +++ b/app/Http/Controllers/Admin/Servers/ServerViewController.php @@ -59,7 +59,6 @@ class ServerViewController extends Controller /** * Returns the server startup management page. * - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function startup(Request $request, Server $server): View { diff --git a/app/Http/Controllers/Admin/ServersController.php b/app/Http/Controllers/Admin/ServersController.php index 1400d36be..6542ae317 100644 --- a/app/Http/Controllers/Admin/ServersController.php +++ b/app/Http/Controllers/Admin/ServersController.php @@ -53,7 +53,6 @@ class ServersController extends Controller * Update the details for a server. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function setDetails(Request $request, Server $server): RedirectResponse { @@ -71,7 +70,6 @@ class ServersController extends Controller * * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function toggleInstall(Server $server): RedirectResponse { @@ -92,7 +90,6 @@ class ServersController extends Controller * * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function reinstallServer(Server $server): RedirectResponse { @@ -107,7 +104,6 @@ class ServersController extends Controller * * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function manageSuspension(Request $request, Server $server): RedirectResponse { @@ -123,7 +119,6 @@ class ServersController extends Controller * Update the build configuration for a server. * * @throws \App\Exceptions\DisplayException - * @throws \App\Exceptions\Repository\RecordNotFoundException * @throws \Illuminate\Validation\ValidationException */ public function updateBuild(Request $request, Server $server): RedirectResponse diff --git a/app/Http/Controllers/Admin/Settings/AdvancedController.php b/app/Http/Controllers/Admin/Settings/AdvancedController.php index e6613b85f..02903b084 100644 --- a/app/Http/Controllers/Admin/Settings/AdvancedController.php +++ b/app/Http/Controllers/Admin/Settings/AdvancedController.php @@ -45,7 +45,6 @@ class AdvancedController extends Controller /** * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function update(AdvancedSettingsFormRequest $request): RedirectResponse { diff --git a/app/Http/Controllers/Admin/Settings/IndexController.php b/app/Http/Controllers/Admin/Settings/IndexController.php index 1d65c3d7b..dbf87e7ef 100644 --- a/app/Http/Controllers/Admin/Settings/IndexController.php +++ b/app/Http/Controllers/Admin/Settings/IndexController.php @@ -43,7 +43,6 @@ class IndexController extends Controller * Handle settings update. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function update(BaseSettingsFormRequest $request): RedirectResponse { diff --git a/app/Http/Controllers/Admin/Settings/MailController.php b/app/Http/Controllers/Admin/Settings/MailController.php index 4fe3086d7..239d15fc8 100644 --- a/app/Http/Controllers/Admin/Settings/MailController.php +++ b/app/Http/Controllers/Admin/Settings/MailController.php @@ -46,7 +46,6 @@ class MailController extends Controller * * @throws DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function update(MailSettingsFormRequest $request): Response { diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 991a3128c..8bfa93102 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -114,7 +114,6 @@ class UserController extends Controller * Update a user on the system. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function update(UserFormRequest $request, User $user): RedirectResponse { diff --git a/app/Http/Controllers/Api/Application/Servers/ServerController.php b/app/Http/Controllers/Api/Application/Servers/ServerController.php index d1624fca7..e91e437e3 100644 --- a/app/Http/Controllers/Api/Application/Servers/ServerController.php +++ b/app/Http/Controllers/Api/Application/Servers/ServerController.php @@ -49,7 +49,6 @@ class ServerController extends ApplicationApiController * @throws \Illuminate\Validation\ValidationException * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException * @throws \App\Exceptions\Service\Deployment\NoViableAllocationException * @throws \App\Exceptions\Service\Deployment\NoViableNodeException */ diff --git a/app/Http/Controllers/Api/Application/Servers/ServerDetailsController.php b/app/Http/Controllers/Api/Application/Servers/ServerDetailsController.php index 3a225e69b..0c4657892 100644 --- a/app/Http/Controllers/Api/Application/Servers/ServerDetailsController.php +++ b/app/Http/Controllers/Api/Application/Servers/ServerDetailsController.php @@ -27,7 +27,6 @@ class ServerDetailsController extends ApplicationApiController * * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function details(UpdateServerDetailsRequest $request, Server $server): array { @@ -46,7 +45,6 @@ class ServerDetailsController extends ApplicationApiController * * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function build(UpdateServerBuildConfigurationRequest $request, Server $server): array { diff --git a/app/Http/Controllers/Api/Application/Servers/ServerManagementController.php b/app/Http/Controllers/Api/Application/Servers/ServerManagementController.php index 0828987a7..8eb46368e 100644 --- a/app/Http/Controllers/Api/Application/Servers/ServerManagementController.php +++ b/app/Http/Controllers/Api/Application/Servers/ServerManagementController.php @@ -50,7 +50,6 @@ class ServerManagementController extends ApplicationApiController * * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function reinstall(ServerWriteRequest $request, Server $server): Response { diff --git a/app/Http/Controllers/Api/Application/Servers/StartupController.php b/app/Http/Controllers/Api/Application/Servers/StartupController.php index 4a70d5e35..110be675f 100644 --- a/app/Http/Controllers/Api/Application/Servers/StartupController.php +++ b/app/Http/Controllers/Api/Application/Servers/StartupController.php @@ -25,7 +25,6 @@ class StartupController extends ApplicationApiController * @throws \Illuminate\Validation\ValidationException * @throws \App\Exceptions\Http\Connection\DaemonConnectionException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function index(UpdateServerStartupRequest $request, Server $server): array { diff --git a/app/Http/Controllers/Api/Application/Users/UserController.php b/app/Http/Controllers/Api/Application/Users/UserController.php index 82d909223..8ad768fe4 100644 --- a/app/Http/Controllers/Api/Application/Users/UserController.php +++ b/app/Http/Controllers/Api/Application/Users/UserController.php @@ -65,7 +65,6 @@ class UserController extends ApplicationApiController * meta. If there are no errors this is an empty array. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function update(UpdateUserRequest $request, User $user): array { diff --git a/app/Http/Controllers/Api/Client/Servers/DatabaseController.php b/app/Http/Controllers/Api/Client/Servers/DatabaseController.php index e6bddd327..e1861fd59 100644 --- a/app/Http/Controllers/Api/Client/Servers/DatabaseController.php +++ b/app/Http/Controllers/Api/Client/Servers/DatabaseController.php @@ -86,7 +86,6 @@ class DatabaseController extends ClientApiController /** * Removes a database from the server. * - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function delete(DeleteDatabaseRequest $request, Server $server, Database $database): Response { diff --git a/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php b/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php index 9ed7e8e47..948fbbace 100644 --- a/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php +++ b/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php @@ -42,7 +42,6 @@ class NetworkAllocationController extends ClientApiController * Set the primary allocation for a server. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function update(UpdateAllocationRequest $request, Server $server, Allocation $allocation): array { @@ -66,7 +65,6 @@ class NetworkAllocationController extends ClientApiController * Set the primary allocation for a server. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function setPrimary(SetPrimaryAllocationRequest $request, Server $server, Allocation $allocation): array { diff --git a/app/Http/Controllers/Api/Client/Servers/ScheduleController.php b/app/Http/Controllers/Api/Client/Servers/ScheduleController.php index f5e489d7c..3cd1329d7 100644 --- a/app/Http/Controllers/Api/Client/Servers/ScheduleController.php +++ b/app/Http/Controllers/Api/Client/Servers/ScheduleController.php @@ -97,7 +97,6 @@ class ScheduleController extends ClientApiController * * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function update(UpdateScheduleRequest $request, Server $server, Schedule $schedule): array { diff --git a/app/Http/Controllers/Api/Client/Servers/ScheduleTaskController.php b/app/Http/Controllers/Api/Client/Servers/ScheduleTaskController.php index 295b87b67..51658bf12 100644 --- a/app/Http/Controllers/Api/Client/Servers/ScheduleTaskController.php +++ b/app/Http/Controllers/Api/Client/Servers/ScheduleTaskController.php @@ -94,7 +94,6 @@ class ScheduleTaskController extends ClientApiController * Updates a given task for a server. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function update(StoreTaskRequest $request, Server $server, Schedule $schedule, Task $task): array { diff --git a/app/Http/Controllers/Api/Client/Servers/StartupController.php b/app/Http/Controllers/Api/Client/Servers/StartupController.php index 48f18bebd..27fb691cb 100644 --- a/app/Http/Controllers/Api/Client/Servers/StartupController.php +++ b/app/Http/Controllers/Api/Client/Servers/StartupController.php @@ -47,7 +47,6 @@ class StartupController extends ClientApiController * * @throws \Illuminate\Validation\ValidationException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function update(UpdateStartupVariableRequest $request, Server $server): array { diff --git a/app/Http/Controllers/Api/Client/Servers/SubuserController.php b/app/Http/Controllers/Api/Client/Servers/SubuserController.php index a51d29f2f..870ca2f50 100644 --- a/app/Http/Controllers/Api/Client/Servers/SubuserController.php +++ b/app/Http/Controllers/Api/Client/Servers/SubuserController.php @@ -81,7 +81,6 @@ class SubuserController extends ClientApiController * Update a given subuser in the system for the server. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function update(UpdateSubuserRequest $request, Server $server): array { diff --git a/app/Http/Controllers/Api/Client/TwoFactorController.php b/app/Http/Controllers/Api/Client/TwoFactorController.php index bdc7364a1..62340e515 100644 --- a/app/Http/Controllers/Api/Client/TwoFactorController.php +++ b/app/Http/Controllers/Api/Client/TwoFactorController.php @@ -31,7 +31,6 @@ class TwoFactorController extends ClientApiController * will return a 400 error. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function index(Request $request): JsonResponse { diff --git a/app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php b/app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php index 45de53c40..6fd488616 100644 --- a/app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php +++ b/app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php @@ -23,8 +23,6 @@ class ServerInstallController extends Controller /** * Returns installation information for a server. - * - * @throws RecordNotFoundException */ public function index(Request $request, string $uuid): JsonResponse { @@ -41,7 +39,6 @@ class ServerInstallController extends Controller /** * Updates the installation state of a server. * - * @throws \App\Exceptions\Repository\RecordNotFoundException * @throws \App\Exceptions\Model\DataValidationException */ public function store(InstallationDataRequest $request, string $uuid): JsonResponse diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index e3edd8312..9f7e8c3ce 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -69,7 +69,6 @@ class ResetPasswordController extends Controller * @param string $password * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ protected function resetPassword($user, $password) { diff --git a/app/Services/Eggs/Sharing/EggExporterService.php b/app/Services/Eggs/Sharing/EggExporterService.php index ce67ff2bc..9787bbf7f 100644 --- a/app/Services/Eggs/Sharing/EggExporterService.php +++ b/app/Services/Eggs/Sharing/EggExporterService.php @@ -13,7 +13,6 @@ class EggExporterService /** * Return a JSON representation of an egg and its variables. * - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function handle(int $egg): string { diff --git a/app/Services/Eggs/Variables/VariableUpdateService.php b/app/Services/Eggs/Variables/VariableUpdateService.php index 34f88647b..515cbc271 100644 --- a/app/Services/Eggs/Variables/VariableUpdateService.php +++ b/app/Services/Eggs/Variables/VariableUpdateService.php @@ -34,7 +34,6 @@ class VariableUpdateService * * @throws \App\Exceptions\DisplayException * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException * @throws \App\Exceptions\Service\Egg\Variable\ReservedVariableNameException */ public function handle(EggVariable $variable, array $data): mixed diff --git a/app/Services/Servers/ServerCreationService.php b/app/Services/Servers/ServerCreationService.php index dd182d1ee..d544d7d9d 100644 --- a/app/Services/Servers/ServerCreationService.php +++ b/app/Services/Servers/ServerCreationService.php @@ -41,7 +41,6 @@ class ServerCreationService * @throws \Throwable * @throws \App\Exceptions\DisplayException * @throws \Illuminate\Validation\ValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException * @throws \App\Exceptions\Service\Deployment\NoViableNodeException * @throws \App\Exceptions\Service\Deployment\NoViableAllocationException */ diff --git a/app/Services/Users/TwoFactorSetupService.php b/app/Services/Users/TwoFactorSetupService.php index 8488e35d0..163565b52 100644 --- a/app/Services/Users/TwoFactorSetupService.php +++ b/app/Services/Users/TwoFactorSetupService.php @@ -25,7 +25,6 @@ class TwoFactorSetupService * order to function. * * @throws \App\Exceptions\Model\DataValidationException - * @throws \App\Exceptions\Repository\RecordNotFoundException */ public function handle(User $user): array { diff --git a/tests/Unit/Http/Middleware/Api/Daemon/DaemonAuthenticateTest.php b/tests/Unit/Http/Middleware/Api/Daemon/DaemonAuthenticateTest.php index b33a90bf3..2b464f8fe 100644 --- a/tests/Unit/Http/Middleware/Api/Daemon/DaemonAuthenticateTest.php +++ b/tests/Unit/Http/Middleware/Api/Daemon/DaemonAuthenticateTest.php @@ -8,7 +8,6 @@ use Mockery\MockInterface; use App\Models\Node; use Illuminate\Contracts\Encryption\Encrypter; use Symfony\Component\HttpKernel\Exception\HttpException; -use App\Exceptions\Repository\RecordNotFoundException; use App\Http\Middleware\Api\Daemon\DaemonAuthenticate; use App\Tests\Unit\Http\Middleware\MiddlewareTestCase; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;