Merge pull request #354 from Pterodactyl/analysis-zeLNpe

Apply fixes from StyleCI
This commit is contained in:
Dane Everitt 2017-03-19 19:52:20 -04:00 committed by GitHub
commit 769b723913
10 changed files with 13 additions and 17 deletions

View File

@ -72,6 +72,7 @@ class RebuildServer extends Command
$servers = Server::where('id', $this->option('server'))->get();
} else {
$this->error('You must pass a flag to determine which server(s) to rebuild.');
return;
}
@ -80,7 +81,7 @@ class RebuildServer extends Command
$this->line('Beginning processing, do not exit this script.');
$bar = $this->output->createProgressBar(count($servers));
$results = collect([]);
foreach($servers as $server) {
foreach ($servers as $server) {
try {
$environment = $server->option->variables->map(function ($item, $key) use ($server) {
$display = $server->variables->where('variable_id', $item->id)->pluck('variable_value')->first();
@ -136,7 +137,7 @@ class RebuildServer extends Command
$this->line("\n");
$results->each(function ($item, $key) use ($console) {
foreach($item['messages'] as $line) {
foreach ($item['messages'] as $line) {
$console->{$item['status']}($line);
}
});

View File

@ -32,7 +32,6 @@ use Dingo\Api\Exception\ResourceException;
use Pterodactyl\Exceptions\DisplayException;
use Pterodactyl\Repositories\NodeRepository;
use Pterodactyl\Exceptions\DisplayValidationException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
@ -113,13 +112,13 @@ class NodeController extends BaseController
return $node->toArray();
}
/**
* Returns a configuration file for a given node.
*
* @param Request $request
* @param int $id
* @return array
*/
/**
* Returns a configuration file for a given node.
*
* @param Request $request
* @param int $id
* @return array
*/
public function config(Request $request, $id)
{
$node = Node::findOrFail($id);

View File

@ -31,7 +31,6 @@ use Dingo\Api\Exception\ResourceException;
use Pterodactyl\Exceptions\DisplayException;
use Pterodactyl\Repositories\ServerRepository;
use Pterodactyl\Exceptions\DisplayValidationException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;

View File

@ -26,7 +26,6 @@ namespace Pterodactyl\Http\Controllers\API;
use Illuminate\Http\Request;
use Pterodactyl\Models\Service;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class ServiceController extends BaseController
{

View File

@ -30,7 +30,6 @@ use Dingo\Api\Exception\ResourceException;
use Pterodactyl\Exceptions\DisplayException;
use Pterodactyl\Repositories\UserRepository;
use Pterodactyl\Exceptions\DisplayValidationException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
class UserController extends BaseController

View File

@ -202,7 +202,6 @@ class PackController extends Controller
return response()->download($filename, 'pack-' . $pack->name . '.zip')->deleteFileAfterSend(true);
} else {
$fp = fopen($filename, 'a+');
fwrite($fp, json_encode($json, JSON_PRETTY_PRINT));
fclose($fp);

View File

@ -116,6 +116,7 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac
}
$this->use_totp = ! $this->use_totp;
return $this->save();
}

View File

@ -25,7 +25,6 @@
namespace Pterodactyl\Repositories\Daemon;
use Pterodactyl\Models;
use GuzzleHttp\Exception\RequestException;
use Pterodactyl\Exceptions\DisplayException;
class CommandRepository

View File

@ -720,7 +720,7 @@ class ServerRepository
}
/**
* Queue a server for deletion
* Queue a server for deletion.
*
* @param int $id
* @param bool $force

View File

@ -31,7 +31,7 @@ use Pterodactyl\Models\APILog;
class APILogService
{
/**
* Log an API Request
* Log an API Request.
*
* @param \Illuminate\Http\Request $request
* @param null|string $error