php-cs-fixer

This commit is contained in:
Matthew Penner 2022-11-29 10:53:59 -07:00
parent 16e34af773
commit 3ea6d45cda
No known key found for this signature in database
87 changed files with 151 additions and 256 deletions

View file

@ -3,7 +3,6 @@
namespace Pterodactyl\Services\Databases;
use Exception;
use InvalidArgumentException;
use Pterodactyl\Models\Server;
use Pterodactyl\Models\Database;
use Pterodactyl\Helpers\Utilities;
@ -86,7 +85,7 @@ class DatabaseManagementService
// Protect against developer mistakes...
if (empty($data['database']) || !preg_match(self::MATCH_NAME_REGEX, $data['database'])) {
throw new InvalidArgumentException('The database name passed to DatabaseManagementService::handle MUST be prefixed with "s{server_id}_".');
throw new \InvalidArgumentException('The database name passed to DatabaseManagementService::handle MUST be prefixed with "s{server_id}_".');
}
$data = array_merge($data, [
@ -117,7 +116,7 @@ class DatabaseManagementService
return $database;
});
} catch (Exception $exception) {
} catch (\Exception $exception) {
try {
/** @var ?Database $database */
if ($database instanceof Database) {
@ -125,7 +124,7 @@ class DatabaseManagementService
$this->repository->dropUser($database->username, $database->remote);
$this->repository->flush();
}
} catch (Exception $deletionException) {
} catch (\Exception $deletionException) {
// Do nothing here. We've already encountered an issue before this point so no
// reason to prioritize this error over the initial one.
}