Use more standardized phpcs

This commit is contained in:
Dane Everitt 2021-01-23 12:33:34 -08:00
parent a043071e3c
commit c449ca5155
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
493 changed files with 1116 additions and 3903 deletions

View file

@ -14,8 +14,6 @@ class ServerInstalled
/**
* Checks that the server is installed before allowing access through the route.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)
@ -23,16 +21,12 @@ class ServerInstalled
/** @var \Pterodactyl\Models\Server|null $server */
$server = $request->route()->parameter('server');
if (! $server instanceof Server) {
throw new NotFoundHttpException(
'No server resource was located in the request parameters.'
);
if (!$server instanceof Server) {
throw new NotFoundHttpException('No server resource was located in the request parameters.');
}
if ($server->installed !== 1) {
throw new HttpException(
Response::HTTP_FORBIDDEN, 'Access to this resource is not allowed due to the current installation state.'
);
throw new HttpException(Response::HTTP_FORBIDDEN, 'Access to this resource is not allowed due to the current installation state.');
}
return $next($request);