Apply fixes from StyleCI (#581)

This commit is contained in:
Dane Everitt 2017-08-12 15:32:34 -05:00 committed by GitHub
parent b8d7d99096
commit 340193c013
15 changed files with 165 additions and 166 deletions

View file

@ -25,14 +25,14 @@
namespace Pterodactyl\Http\Controllers\Admin; namespace Pterodactyl\Http\Controllers\Admin;
use Prologue\Alerts\AlertsMessageBag; use Prologue\Alerts\AlertsMessageBag;
use Pterodactyl\Http\Controllers\Controller;
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
use Pterodactyl\Http\Requests\Admin\OptionVariableFormRequest;
use Pterodactyl\Models\ServiceOption; use Pterodactyl\Models\ServiceOption;
use Pterodactyl\Models\ServiceVariable; use Pterodactyl\Models\ServiceVariable;
use Pterodactyl\Http\Controllers\Controller;
use Pterodactyl\Http\Requests\Admin\OptionVariableFormRequest;
use Pterodactyl\Repositories\Eloquent\ServiceVariableRepository; use Pterodactyl\Repositories\Eloquent\ServiceVariableRepository;
use Pterodactyl\Services\Services\Variables\VariableCreationService;
use Pterodactyl\Services\Services\Variables\VariableUpdateService; use Pterodactyl\Services\Services\Variables\VariableUpdateService;
use Pterodactyl\Services\Services\Variables\VariableCreationService;
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
class VariableController extends Controller class VariableController extends Controller
{ {

View file

@ -25,9 +25,7 @@
namespace Pterodactyl\Providers; namespace Pterodactyl\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Pterodactyl\Contracts\Repository\ServiceVariableRepositoryInterface;
use Pterodactyl\Repositories\Eloquent\NodeRepository; use Pterodactyl\Repositories\Eloquent\NodeRepository;
use Pterodactyl\Repositories\Eloquent\ServiceVariableRepository;
use Pterodactyl\Repositories\Eloquent\UserRepository; use Pterodactyl\Repositories\Eloquent\UserRepository;
use Pterodactyl\Repositories\Eloquent\ApiKeyRepository; use Pterodactyl\Repositories\Eloquent\ApiKeyRepository;
use Pterodactyl\Repositories\Eloquent\ServerRepository; use Pterodactyl\Repositories\Eloquent\ServerRepository;
@ -46,6 +44,7 @@ use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
use Pterodactyl\Repositories\Eloquent\OptionVariableRepository; use Pterodactyl\Repositories\Eloquent\OptionVariableRepository;
use Pterodactyl\Repositories\Eloquent\ServerVariableRepository; use Pterodactyl\Repositories\Eloquent\ServerVariableRepository;
use Pterodactyl\Contracts\Repository\ServiceRepositoryInterface; use Pterodactyl\Contracts\Repository\ServiceRepositoryInterface;
use Pterodactyl\Repositories\Eloquent\ServiceVariableRepository;
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface; use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface; use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface; use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface;
@ -54,6 +53,7 @@ use Pterodactyl\Contracts\Repository\ApiPermissionRepositoryInterface;
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface; use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
use Pterodactyl\Contracts\Repository\OptionVariableRepositoryInterface; use Pterodactyl\Contracts\Repository\OptionVariableRepositoryInterface;
use Pterodactyl\Contracts\Repository\ServerVariableRepositoryInterface; use Pterodactyl\Contracts\Repository\ServerVariableRepositoryInterface;
use Pterodactyl\Contracts\Repository\ServiceVariableRepositoryInterface;
use Pterodactyl\Contracts\Repository\Daemon\ConfigurationRepositoryInterface; use Pterodactyl\Contracts\Repository\Daemon\ConfigurationRepositoryInterface;
use Pterodactyl\Repositories\Daemon\ServerRepository as DaemonServerRepository; use Pterodactyl\Repositories\Daemon\ServerRepository as DaemonServerRepository;
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface; use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;

View file

@ -24,9 +24,9 @@
namespace Pterodactyl\Services\Services\Options; namespace Pterodactyl\Services\Services\Options;
use Pterodactyl\Models\ServiceOption;
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface; use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
use Pterodactyl\Exceptions\Services\ServiceOption\NoParentConfigurationFoundException; use Pterodactyl\Exceptions\Services\ServiceOption\NoParentConfigurationFoundException;
use Pterodactyl\Models\ServiceOption;
class OptionUpdateService class OptionUpdateService
{ {

View file

@ -24,11 +24,11 @@
namespace Pterodactyl\Services\Services\Variables; namespace Pterodactyl\Services\Services\Variables;
use Pterodactyl\Models\ServiceOption;
use Pterodactyl\Models\ServiceVariable;
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface; use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
use Pterodactyl\Contracts\Repository\ServiceVariableRepositoryInterface; use Pterodactyl\Contracts\Repository\ServiceVariableRepositoryInterface;
use Pterodactyl\Exceptions\Services\ServiceVariable\ReservedVariableNameException; use Pterodactyl\Exceptions\Services\ServiceVariable\ReservedVariableNameException;
use Pterodactyl\Models\ServiceOption;
use Pterodactyl\Models\ServiceVariable;
class VariableCreationService class VariableCreationService
{ {

View file

@ -87,7 +87,7 @@ class AssignmentServiceTest extends TestCase
{ {
$data = [ $data = [
'allocation_ip' => '192.168.1.1', 'allocation_ip' => '192.168.1.1',
'allocation_ports' => ['1024'] 'allocation_ports' => ['1024'],
]; ];
$this->connection->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull(); $this->connection->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull();
@ -112,7 +112,7 @@ class AssignmentServiceTest extends TestCase
{ {
$data = [ $data = [
'allocation_ip' => '192.168.1.1', 'allocation_ip' => '192.168.1.1',
'allocation_ports' => ['1024-1026'] 'allocation_ports' => ['1024-1026'],
]; ];
$this->connection->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull(); $this->connection->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull();
@ -142,7 +142,6 @@ class AssignmentServiceTest extends TestCase
$this->connection->shouldReceive('commit')->withNoArgs()->once()->andReturnNull(); $this->connection->shouldReceive('commit')->withNoArgs()->once()->andReturnNull();
$this->service->handle($this->node->id, $data); $this->service->handle($this->node->id, $data);
} }
/** /**
@ -307,7 +306,7 @@ class AssignmentServiceTest extends TestCase
{ {
$data = [ $data = [
'allocation_ip' => '192.168.1.1', 'allocation_ip' => '192.168.1.1',
'allocation_ports' => ['1024'] 'allocation_ports' => ['1024'],
]; ];
$this->connection->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull(); $this->connection->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull();