Apply fixes from StyleCI (#331)

This commit is contained in:
Dane Everitt 2017-03-03 23:38:21 -05:00 committed by GitHub
parent e6d3663b3b
commit b1564389d8
5 changed files with 12 additions and 15 deletions

View file

@ -27,7 +27,6 @@ namespace Pterodactyl\Http\Controllers\Admin;
use DB;
use Log;
use Alert;
use Carbon;
use Javascript;
use Pterodactyl\Models;
use Illuminate\Http\Request;
@ -206,7 +205,7 @@ class NodesController extends Controller
* Updates settings for a node.
*
* @param Request $request
* @param integer $node
* @param int $node
* @return \Illuminate\Http\RedirectResponse
*/
public function updateSettings(Request $request, $id)
@ -237,8 +236,8 @@ class NodesController extends Controller
* Removes a single allocation from a node.
*
* @param Request $request
* @param integer $node
* @param integer $allocation [description]
* @param int $node
* @param int $allocation [description]
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
*/
public function allocationRemoveSingle(Request $request, $node, $allocation)
@ -257,7 +256,7 @@ class NodesController extends Controller
* Remove all allocations for a specific IP at once on a node.
*
* @param Request $request
* @param integer $node
* @param int $node
* @return \Illuminate\Http\RedirectResponse
*/
public function allocationRemoveBlock(Request $request, $node)
@ -276,7 +275,7 @@ class NodesController extends Controller
* Sets an alias for a specific allocation on a node.
*
* @param Request $request
* @param integer $node
* @param int $node
* @return \Illuminate\Http\Response
* @throws \Exception
*/
@ -301,7 +300,7 @@ class NodesController extends Controller
* Creates new allocations on a node.
*
* @param Request $request
* @param integer $node
* @param int $node
* @return \Illuminate\Http\RedirectResponse
*/
public function createAllocation(Request $request, $node)
@ -327,7 +326,7 @@ class NodesController extends Controller
* Deletes a node from the system.
*
* @param Request $request
* @param integer $id
* @param int $id
* @return \Illuminate\Http\RedirectResponse
*/
public function delete(Request $request, $id)
@ -353,7 +352,7 @@ class NodesController extends Controller
* Returns the configuration token to auto-deploy a node.
*
* @param Request $request
* @param integer $id
* @param int $id
* @return \Illuminate\Http\JsonResponse
*/
public function setToken(Request $request, $id)

View file

@ -154,7 +154,7 @@ class ServersController extends Controller
try {
$server = new ServerRepository;
$server->updateDetails($id, $request->intersect([
'owner_id', 'name', 'reset_token'
'owner_id', 'name', 'reset_token',
]));
Alert::success('Server details were successfully updated.')->flash();

View file

@ -179,7 +179,7 @@ class NodeRepository
/**
* Adds allocations to a provided node.
* @param integer $id
* @param int $id
* @param array $data
*/
public function addAllocations($id, array $data)
@ -204,7 +204,7 @@ class NodeRepository
}
DB::transaction(function () use ($parsed, $node, $data) {
foreach(Network::parse(gethostbyname($data['allocation_ip'])) as $ip) {
foreach (Network::parse(gethostbyname($data['allocation_ip'])) as $ip) {
foreach ($data['allocation_ports'] as $port) {
// Determine if this is a valid single port, or a valid port range.
if (! ctype_digit($port) && ! preg_match('/^(\d{1,5})-(\d{1,5})$/', $port)) {

View file

@ -354,7 +354,7 @@ class ServerRepository
$validator = Validator::make($data, [
'owner_id' => 'sometimes|required|numeric|exists:users,id',
'name' => 'sometimes|required|regex:([\w .-]{1,200})',
'reset_token' => 'sometimes|required|accepted'
'reset_token' => 'sometimes|required|accepted',
]);
// Run validator, throw catchable and displayable exception if it fails.

View file

@ -1,10 +1,8 @@
<?php
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Pterodactyl\Models\NodeConfigurationToken;
class UpdateNodeConfigTokensColumns extends Migration
{