1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 17:12:30 +01:00

Apply fixes from StyleCI (#312)

* Bump for release

* Apply fixes from StyleCI
This commit is contained in:
Dane Everitt 2017-02-18 22:57:50 -05:00 committed by GitHub
parent ed4068bdb9
commit b11029a666
8 changed files with 8 additions and 11 deletions

View File

@ -80,6 +80,7 @@ class APIController extends Controller
return response('', 204);
} catch (\Exception $ex) {
Log::error($ex);
return response()->json([
'error' => 'An error occured while attempting to remove this key.',
], 503);

View File

@ -31,7 +31,6 @@ use Pterodactyl\Models\Server;
class ServerPolicy
{
/**
* Create a new policy instance.
*
@ -62,7 +61,7 @@ class ServerPolicy
})->values();
});
return ($permissions->search($permission, true) !== false);
return $permissions->search($permission, true) !== false;
}
/**

View File

@ -225,7 +225,7 @@ class APIRepository
try {
$model = Models\APIKey::with('permissions')->where('public', $key)->where('user_id', $this->user->id)->firstOrFail();
foreach($model->permissions as &$permission) {
foreach ($model->permissions as &$permission) {
$permission->delete();
}

View File

@ -24,7 +24,6 @@
namespace Pterodactyl\Repositories\Daemon;
use GuzzleHttp\Client;
use Pterodactyl\Models;
use GuzzleHttp\Exception\RequestException;
use Pterodactyl\Exceptions\DisplayException;

View File

@ -24,7 +24,6 @@
namespace Pterodactyl\Repositories\Daemon;
use GuzzleHttp\Client;
use Pterodactyl\Models;
use Pterodactyl\Exceptions\DisplayException;

View File

@ -791,8 +791,8 @@ class ServerRepository
Models\ServerVariable::where('server_id', $server->id)->delete();
// Remove SubUsers
foreach(Models\Subuser::with('permissions')->where('server_id', $server->id)->get() as &$subuser) {
foreach($subuser->permissions as &$permission) {
foreach (Models\Subuser::with('permissions')->where('server_id', $server->id)->get() as &$subuser) {
foreach ($subuser->permissions as &$permission) {
$permission->delete();
}
$subuser->delete();

View File

@ -34,7 +34,6 @@ use Validator;
use Pterodactyl\Models;
use Pterodactyl\Services\UuidService;
use Pterodactyl\Exceptions\DisplayException;
use Pterodactyl\Notifications\AccountCreated;
use Pterodactyl\Exceptions\DisplayValidationException;
class UserRepository
@ -177,8 +176,8 @@ class UserRepository
DB::beginTransaction();
try {
foreach(Models\Subuser::with('permissions')->where('user_id', $id)->get() as &$subuser) {
foreach($subuser->permissions as &$permission) {
foreach (Models\Subuser::with('permissions')->where('user_id', $id)->get() as &$subuser) {
foreach ($subuser->permissions as &$permission) {
$permission->delete();
}

View File

@ -4,7 +4,7 @@ return [
'env' => env('APP_ENV', 'production'),
'version' => env('APP_VERSION', 'canary'),
'version' => env('APP_VERSION', '0.6.0-pre.4'),
'phrase_in_context' => env('PHRASE_IN_CONTEXT', false),