Apply fixes from StyleCI
This commit is contained in:
parent
a1d3bbf73d
commit
c1fb0a665f
150 changed files with 1558 additions and 1760 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>
|
||||
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -21,16 +21,12 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Jobs;
|
||||
|
||||
use DB;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
use Pterodactyl\Models;
|
||||
use Pterodactyl\Repositories\ServerRepository;
|
||||
|
||||
class DeleteServer extends Job implements ShouldQueue
|
||||
|
@ -46,7 +42,7 @@ class DeleteServer extends Job implements ShouldQueue
|
|||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param integer $server
|
||||
* @param int $server
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($id)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>
|
||||
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -21,19 +21,17 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Jobs;
|
||||
|
||||
use Pterodactyl\Jobs\Job;
|
||||
use Cron;
|
||||
use Carbon;
|
||||
use Pterodactyl\Models;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
use DB;
|
||||
use Carbon;
|
||||
use Cron;
|
||||
use Pterodactyl\Models;
|
||||
use Pterodactyl\Repositories\Daemon\CommandRepository;
|
||||
use Pterodactyl\Repositories\Daemon\PowerRepository;
|
||||
use Pterodactyl\Repositories\Daemon\CommandRepository;
|
||||
|
||||
class SendScheduledTask extends Job implements ShouldQueue
|
||||
{
|
||||
|
@ -76,7 +74,7 @@ class SendScheduledTask extends Job implements ShouldQueue
|
|||
if ($this->task->action === 'command') {
|
||||
$repo = new CommandRepository($this->server);
|
||||
$response = $repo->send($this->task->data);
|
||||
} else if ($this->task->action === 'power') {
|
||||
} elseif ($this->task->action === 'power') {
|
||||
$repo = new PowerRepository($this->server);
|
||||
$response = $repo->do($this->task->data);
|
||||
}
|
||||
|
@ -84,14 +82,14 @@ class SendScheduledTask extends Job implements ShouldQueue
|
|||
'task_id' => $this->task->id,
|
||||
'run_time' => $time,
|
||||
'run_status' => 0,
|
||||
'response' => $response
|
||||
'response' => $response,
|
||||
]);
|
||||
} catch (\Exception $ex) {
|
||||
$log->fill([
|
||||
'task_id' => $this->task->id,
|
||||
'run_time' => $time,
|
||||
'run_status' => 1,
|
||||
'response' => $ex->getMessage()
|
||||
'response' => $ex->getMessage(),
|
||||
]);
|
||||
} finally {
|
||||
$cron = Cron::factory(sprintf('%s %s %s %s %s %s',
|
||||
|
@ -105,7 +103,7 @@ class SendScheduledTask extends Job implements ShouldQueue
|
|||
$this->task->fill([
|
||||
'last_run' => $time,
|
||||
'next_run' => $cron->getNextRunDate(),
|
||||
'queued' => 0
|
||||
'queued' => 0,
|
||||
]);
|
||||
$this->task->save();
|
||||
$log->save();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>
|
||||
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -21,14 +21,12 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Jobs;
|
||||
|
||||
use Debugbar;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
use Pterodactyl\Repositories\ServerRepository;
|
||||
|
||||
class SuspendServer extends Job implements ShouldQueue
|
||||
|
@ -44,7 +42,7 @@ class SuspendServer extends Job implements ShouldQueue
|
|||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param integer $id
|
||||
* @param int $id
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue