Format files
This commit is contained in:
parent
26e4ff1f62
commit
7543ef085d
193 changed files with 624 additions and 602 deletions
|
@ -37,10 +37,10 @@ class BuildModificationService
|
|||
/**
|
||||
* BuildModificationService constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Contracts\Repository\AllocationRepositoryInterface $allocationRepository
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Contracts\Repository\AllocationRepositoryInterface $allocationRepository
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
*/
|
||||
public function __construct(
|
||||
AllocationRepositoryInterface $allocationRepository,
|
||||
|
@ -58,7 +58,7 @@ class BuildModificationService
|
|||
* Change the build details for a specified server.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return \Pterodactyl\Models\Server
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -123,7 +123,7 @@ class BuildModificationService
|
|||
* are available for a server.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
*/
|
||||
|
|
|
@ -36,10 +36,10 @@ class DetailsModificationService
|
|||
/**
|
||||
* DetailsModificationService constructor.
|
||||
*
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Services\DaemonKeys\DaemonKeyCreationService $keyCreationService
|
||||
* @param \Pterodactyl\Services\DaemonKeys\DaemonKeyDeletionService $keyDeletionService
|
||||
* @param \Pterodactyl\Repositories\Eloquent\ServerRepository $repository
|
||||
* @param \Pterodactyl\Repositories\Eloquent\ServerRepository $repository
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $connection,
|
||||
|
@ -57,7 +57,7 @@ class DetailsModificationService
|
|||
* Update the details for a single server instance.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return bool|\Pterodactyl\Models\Server
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
|
|
@ -26,7 +26,7 @@ class EnvironmentService
|
|||
/**
|
||||
* EnvironmentService constructor.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Config\Repository $config
|
||||
* @param \Illuminate\Contracts\Config\Repository $config
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
*/
|
||||
public function __construct(ConfigRepository $config, ServerRepositoryInterface $repository)
|
||||
|
@ -39,7 +39,7 @@ class EnvironmentService
|
|||
* Dynamically configure additional environment variables to be assigned
|
||||
* with a specific server.
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $key
|
||||
* @param callable $closure
|
||||
*/
|
||||
public function setEnvironmentKey(string $key, callable $closure)
|
||||
|
|
|
@ -36,9 +36,9 @@ class ReinstallServerService
|
|||
/**
|
||||
* ReinstallService constructor.
|
||||
*
|
||||
* @param \Illuminate\Database\ConnectionInterface $database
|
||||
* @param \Illuminate\Database\ConnectionInterface $database
|
||||
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $database,
|
||||
|
|
|
@ -30,7 +30,7 @@ class ServerConfigurationStructureService
|
|||
* ServerConfigurationStructureService constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Services\Servers\EnvironmentService $environment
|
||||
* @param \Pterodactyl\Services\Servers\EnvironmentService $environment
|
||||
*/
|
||||
public function __construct(
|
||||
ServerRepositoryInterface $repository,
|
||||
|
|
|
@ -75,16 +75,16 @@ class ServerCreationService
|
|||
/**
|
||||
* CreationService constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Contracts\Repository\AllocationRepositoryInterface $allocationRepository
|
||||
* @param \Pterodactyl\Services\Deployment\AllocationSelectionService $allocationSelectionService
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\EggRepositoryInterface $eggRepository
|
||||
* @param \Pterodactyl\Services\Deployment\FindViableNodesService $findViableNodesService
|
||||
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $configurationStructureService
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Contracts\Repository\AllocationRepositoryInterface $allocationRepository
|
||||
* @param \Pterodactyl\Services\Deployment\AllocationSelectionService $allocationSelectionService
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\EggRepositoryInterface $eggRepository
|
||||
* @param \Pterodactyl\Services\Deployment\FindViableNodesService $findViableNodesService
|
||||
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $configurationStructureService
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerVariableRepositoryInterface $serverVariableRepository
|
||||
* @param \Pterodactyl\Services\Servers\VariableValidatorService $validatorService
|
||||
* @param \Pterodactyl\Services\Servers\VariableValidatorService $validatorService
|
||||
*/
|
||||
public function __construct(
|
||||
AllocationRepositoryInterface $allocationRepository,
|
||||
|
@ -116,7 +116,7 @@ class ServerCreationService
|
|||
* as possible given the input data. For example, if an allocation_id is passed with
|
||||
* no node_id the node_is will be picked from the allocation.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @param \Pterodactyl\Models\Objects\DeploymentObject|null $deployment
|
||||
* @return \Pterodactyl\Models\Server
|
||||
*
|
||||
|
@ -179,7 +179,7 @@ class ServerCreationService
|
|||
/**
|
||||
* Gets an allocation to use for automatic deployment.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @param \Pterodactyl\Models\Objects\DeploymentObject $deployment
|
||||
*
|
||||
* @return \Pterodactyl\Models\Allocation
|
||||
|
@ -244,7 +244,7 @@ class ServerCreationService
|
|||
* Configure the allocations assigned to this server.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
*/
|
||||
private function storeAssignedAllocations(Server $server, array $data)
|
||||
{
|
||||
|
@ -259,7 +259,7 @@ class ServerCreationService
|
|||
/**
|
||||
* Process environment variables passed for this server and store them in the database.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param \Illuminate\Support\Collection $variables
|
||||
*/
|
||||
private function storeEggVariables(Server $server, Collection $variables)
|
||||
|
|
|
@ -58,12 +58,12 @@ class ServerDeletionService
|
|||
/**
|
||||
* DeletionService constructor.
|
||||
*
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
|
||||
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Psr\Log\LoggerInterface $writer
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
|
||||
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Psr\Log\LoggerInterface $writer
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $connection,
|
||||
|
|
|
@ -55,13 +55,13 @@ class StartupModificationService
|
|||
/**
|
||||
* StartupModificationService constructor.
|
||||
*
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\EggRepositoryInterface $eggRepository
|
||||
* @param \Pterodactyl\Services\Servers\EnvironmentService $environmentService
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\EggRepositoryInterface $eggRepository
|
||||
* @param \Pterodactyl\Services\Servers\EnvironmentService $environmentService
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerVariableRepositoryInterface $serverVariableRepository
|
||||
* @param \Pterodactyl\Services\Servers\VariableValidatorService $validatorService
|
||||
* @param \Pterodactyl\Services\Servers\VariableValidatorService $validatorService
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $connection,
|
||||
|
@ -85,7 +85,7 @@ class StartupModificationService
|
|||
* Process startup modification for a server.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return \Pterodactyl\Models\Server
|
||||
*
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
|
@ -136,9 +136,9 @@ class StartupModificationService
|
|||
/**
|
||||
* Update certain administrative settings for a server in the DB.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param array $daemonData
|
||||
* @param array $daemonData
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
namespace Pterodactyl\Services\Servers;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Psr\Log\LoggerInterface as Writer;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
|
@ -45,10 +46,10 @@ class SuspensionService
|
|||
/**
|
||||
* SuspensionService constructor.
|
||||
*
|
||||
* @param \Illuminate\Database\ConnectionInterface $database
|
||||
* @param \Illuminate\Database\ConnectionInterface $database
|
||||
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Psr\Log\LoggerInterface $writer
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Psr\Log\LoggerInterface $writer
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $database,
|
||||
|
@ -66,7 +67,7 @@ class SuspensionService
|
|||
* Suspends a server on the system.
|
||||
*
|
||||
* @param int|\Pterodactyl\Models\Server $server
|
||||
* @param string $action
|
||||
* @param string $action
|
||||
* @return bool
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -80,7 +81,7 @@ class SuspensionService
|
|||
}
|
||||
|
||||
if (! in_array($action, [self::ACTION_SUSPEND, self::ACTION_UNSUSPEND])) {
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
throw new InvalidArgumentException(sprintf(
|
||||
'Action must be either ' . self::ACTION_SUSPEND . ' or ' . self::ACTION_UNSUSPEND . ', %s passed.',
|
||||
$action
|
||||
));
|
||||
|
|
|
@ -45,10 +45,10 @@ class VariableValidatorService
|
|||
/**
|
||||
* VariableValidatorService constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Contracts\Repository\EggVariableRepositoryInterface $optionVariableRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $serverRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\EggVariableRepositoryInterface $optionVariableRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $serverRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerVariableRepositoryInterface $serverVariableRepository
|
||||
* @param \Illuminate\Contracts\Validation\Factory $validator
|
||||
* @param \Illuminate\Contracts\Validation\Factory $validator
|
||||
*/
|
||||
public function __construct(
|
||||
EggVariableRepositoryInterface $optionVariableRepository,
|
||||
|
@ -65,7 +65,7 @@ class VariableValidatorService
|
|||
/**
|
||||
* Validate all of the passed data against the given service option variables.
|
||||
*
|
||||
* @param int $egg
|
||||
* @param int $egg
|
||||
* @param array $fields
|
||||
* @return \Illuminate\Support\Collection
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
|
|
Reference in a new issue