Massive PHPCS linting

This commit is contained in:
Dane Everitt 2017-08-21 22:10:48 -05:00
parent 78c8b8d8ea
commit 3ee5803416
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
346 changed files with 834 additions and 1424 deletions

View file

@ -31,6 +31,7 @@ return PhpCsFixer\Config::create()
'no_unreachable_default_argument_value' => true, 'no_unreachable_default_argument_value' => true,
'no_useless_return' => true, 'no_useless_return' => true,
'not_operator_with_successor_space' => true, 'not_operator_with_successor_space' => true,
'phpdoc_align' => ['tags' => ['param']],
'phpdoc_separation' => false, 'phpdoc_separation' => false,
'protected_to_private' => false, 'protected_to_private' => false,
'psr0' => ['dir' => 'app'], 'psr0' => ['dir' => 'app'],

View file

@ -49,8 +49,6 @@ class AddLocation extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -57,8 +57,6 @@ class AddNode extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -46,8 +46,6 @@ class CleanServiceBackup extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -45,8 +45,6 @@ class ClearServices extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -49,8 +49,6 @@ class ClearTasks extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -51,8 +51,6 @@ class MakeUser extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -49,8 +49,6 @@ class RebuildServer extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -50,8 +50,6 @@ class RunTasks extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -45,8 +45,6 @@ class ShowVersion extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -51,8 +51,6 @@ class UpdateEmailSettings extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -55,8 +55,6 @@ class UpdateEnvironment extends Command
/** /**
* Create a new command instance. * Create a new command instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -31,7 +31,6 @@ class Kernel extends ConsoleKernel
* Define the application's command schedule. * Define the application's command schedule.
* *
* @param \Illuminate\Console\Scheduling\Schedule $schedule * @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/ */
protected function schedule(Schedule $schedule) protected function schedule(Schedule $schedule)
{ {

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Contracts\Repository;
interface ApiKeyRepositoryInterface extends RepositoryInterface interface ApiKeyRepositoryInterface extends RepositoryInterface
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Contracts\Repository;
interface ApiPermissionRepositoryInterface extends RepositoryInterface interface ApiPermissionRepositoryInterface extends RepositoryInterface
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Contracts\Repository;
interface OptionVariableRepositoryInterface extends RepositoryInterface interface OptionVariableRepositoryInterface extends RepositoryInterface
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Contracts\Repository;
interface ServerVariableRepositoryInterface extends RepositoryInterface interface ServerVariableRepositoryInterface extends RepositoryInterface
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Contracts\Repository;
interface ServiceVariableRepositoryInterface extends RepositoryInterface interface ServiceVariableRepositoryInterface extends RepositoryInterface
{ {
//
} }

View file

@ -49,7 +49,6 @@ class FailedCaptcha
* *
* @param string $ip * @param string $ip
* @param string $domain * @param string $domain
* @return void
*/ */
public function __construct($ip, $domain) public function __construct($ip, $domain)
{ {

View file

@ -49,7 +49,6 @@ class FailedPasswordReset
* *
* @param string $ip * @param string $ip
* @param string $email * @param string $email
* @return void
*/ */
public function __construct($ip, $email) public function __construct($ip, $email)
{ {

View file

@ -4,5 +4,4 @@ namespace Pterodactyl\Events;
abstract class Event abstract class Event
{ {
//
} }

View file

@ -42,7 +42,6 @@ class Created
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function __construct(Server $server) public function __construct(Server $server)
{ {

View file

@ -42,7 +42,6 @@ class Creating
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function __construct(Server $server) public function __construct(Server $server)
{ {

View file

@ -42,7 +42,6 @@ class Deleted
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function __construct(Server $server) public function __construct(Server $server)
{ {

View file

@ -42,7 +42,6 @@ class Deleting
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function __construct(Server $server) public function __construct(Server $server)
{ {

View file

@ -42,7 +42,6 @@ class Saved
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function __construct(Server $server) public function __construct(Server $server)
{ {

View file

@ -42,7 +42,6 @@ class Saving
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function __construct(Server $server) public function __construct(Server $server)
{ {

View file

@ -42,7 +42,6 @@ class Updated
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function __construct(Server $server) public function __construct(Server $server)
{ {

View file

@ -42,7 +42,6 @@ class Updating
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function __construct(Server $server) public function __construct(Server $server)
{ {

View file

@ -42,7 +42,6 @@ class Created
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Subuser $subuser * @param \Pterodactyl\Models\Subuser $subuser
* @return void
*/ */
public function __construct(Subuser $subuser) public function __construct(Subuser $subuser)
{ {

View file

@ -42,7 +42,6 @@ class Creating
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Subuser $subuser * @param \Pterodactyl\Models\Subuser $subuser
* @return void
*/ */
public function __construct(Subuser $subuser) public function __construct(Subuser $subuser)
{ {

View file

@ -42,7 +42,6 @@ class Deleted
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Subuser $subuser * @param \Pterodactyl\Models\Subuser $subuser
* @return void
*/ */
public function __construct(Subuser $subuser) public function __construct(Subuser $subuser)
{ {

View file

@ -42,7 +42,6 @@ class Deleting
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\Subuser $subuser * @param \Pterodactyl\Models\Subuser $subuser
* @return void
*/ */
public function __construct(Subuser $subuser) public function __construct(Subuser $subuser)
{ {

View file

@ -42,7 +42,6 @@ class Created
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @return void
*/ */
public function __construct(User $user) public function __construct(User $user)
{ {

View file

@ -42,7 +42,6 @@ class Creating
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @return void
*/ */
public function __construct(User $user) public function __construct(User $user)
{ {

View file

@ -42,7 +42,6 @@ class Deleted
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @return void
*/ */
public function __construct(User $user) public function __construct(User $user)
{ {

View file

@ -42,7 +42,6 @@ class Deleting
* Create a new event instance. * Create a new event instance.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @return void
*/ */
public function __construct(User $user) public function __construct(User $user)
{ {

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Exceptions;
class AccountNotFoundException extends \Exception class AccountNotFoundException extends \Exception
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Exceptions;
class AutoDeploymentException extends \Exception class AutoDeploymentException extends \Exception
{ {
//
} }

View file

@ -33,7 +33,6 @@ class DisplayException extends PterodactylException
* *
* @param string $message * @param string $message
* @param mixed $log * @param mixed $log
* @return void
*/ */
public function __construct($message, $log = null) public function __construct($message, $log = null)
{ {

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Exceptions;
class DisplayValidationException extends PterodactylException class DisplayValidationException extends PterodactylException
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Exceptions;
class PterodactylException extends \Exception class PterodactylException extends \Exception
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Exceptions\Repository;
class RecordNotFoundException extends \Exception class RecordNotFoundException extends \Exception
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Exceptions\Repository;
class RepositoryException extends \Exception class RepositoryException extends \Exception
{ {
//
} }

View file

@ -28,5 +28,4 @@ use Pterodactyl\Exceptions\DisplayException;
class HasActiveServersException extends DisplayException class HasActiveServersException extends DisplayException
{ {
//
} }

View file

@ -28,5 +28,4 @@ use Pterodactyl\Exceptions\DisplayException;
class InvalidFileMimeTypeException extends DisplayException class InvalidFileMimeTypeException extends DisplayException
{ {
//
} }

View file

@ -28,5 +28,4 @@ use Pterodactyl\Exceptions\DisplayException;
class InvalidFileUploadException extends DisplayException class InvalidFileUploadException extends DisplayException
{ {
//
} }

View file

@ -28,5 +28,4 @@ use Pterodactyl\Exceptions\DisplayException;
class InvalidPackArchiveFormatException extends DisplayException class InvalidPackArchiveFormatException extends DisplayException
{ {
//
} }

View file

@ -28,5 +28,4 @@ use Pterodactyl\Exceptions\DisplayException;
class UnreadableZipArchiveException extends DisplayException class UnreadableZipArchiveException extends DisplayException
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Exceptions\Service\Pack;
class ZipArchiveCreationException extends \Exception class ZipArchiveCreationException extends \Exception
{ {
//
} }

View file

@ -28,5 +28,4 @@ use Exception;
class RequiredVariableMissingException extends Exception class RequiredVariableMissingException extends Exception
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Exceptions\Service\ServiceOption;
class InvalidCopyFromException extends \Exception class InvalidCopyFromException extends \Exception
{ {
//
} }

View file

@ -26,5 +26,4 @@ namespace Pterodactyl\Exceptions\Service\ServiceOption;
class NoParentConfigurationFoundException extends \Exception class NoParentConfigurationFoundException extends \Exception
{ {
//
} }

View file

@ -28,5 +28,4 @@ use Exception;
class ReservedVariableNameException extends Exception class ReservedVariableNameException extends Exception
{ {
//
} }

View file

@ -555,7 +555,8 @@ class ServersController extends Controller
public function saveStartup(Request $request, Server $server) public function saveStartup(Request $request, Server $server)
{ {
$this->startupModificationService->isAdmin()->handle( $this->startupModificationService->isAdmin()->handle(
$server, $request->except('_token') $server,
$request->except('_token')
); );
$this->alert->success(trans('admin/server.alerts.startup_changed'))->flash(); $this->alert->success(trans('admin/server.alerts.startup_changed'))->flash();

View file

@ -47,8 +47,6 @@ class ForgotPasswordController extends Controller
/** /**
* Create a new controller instance. * Create a new controller instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -71,8 +71,6 @@ class LoginController extends Controller
/** /**
* Create a new controller instance. * Create a new controller instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -31,8 +31,6 @@ class RegisterController extends Controller
/** /**
* Create a new controller instance. * Create a new controller instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -30,8 +30,6 @@ class ResetPasswordController extends Controller
/** /**
* Create a new controller instance. * Create a new controller instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -102,7 +102,6 @@ class IndexController extends Controller
return response()->json(json_decode($res->getBody())); return response()->json(json_decode($res->getBody()));
} }
} catch (\Exception $e) { } catch (\Exception $e) {
//
} }
return response()->json([]); return response()->json([]);

View file

@ -81,10 +81,8 @@ class PackController extends Controller
* Pulls an update pack archive from the system. * Pulls an update pack archive from the system.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @return void
*/ */
public function pullUpdate(Request $request) public function pullUpdate(Request $request)
{ {
//
} }
} }

View file

@ -40,7 +40,6 @@ class AdminAuthenticate
* Create a new filter instance. * Create a new filter instance.
* *
* @param \Illuminate\Contracts\Auth\Guard $auth * @param \Illuminate\Contracts\Auth\Guard $auth
* @return void
*/ */
public function __construct(Guard $auth) public function __construct(Guard $auth)
{ {

View file

@ -18,7 +18,6 @@ class Authenticate
* Create a new filter instance. * Create a new filter instance.
* *
* @param \Illuminate\Contracts\Auth\Guard $auth * @param \Illuminate\Contracts\Auth\Guard $auth
* @return void
*/ */
public function __construct(Guard $auth) public function __construct(Guard $auth)
{ {

View file

@ -50,7 +50,6 @@ class DaemonAuthenticate
* Create a new filter instance. * Create a new filter instance.
* *
* @param \Illuminate\Contracts\Auth\Guard $auth * @param \Illuminate\Contracts\Auth\Guard $auth
* @return void
*/ */
public function __construct(Guard $auth) public function __construct(Guard $auth)
{ {

View file

@ -12,6 +12,5 @@ class EncryptCookies extends BaseEncrypter
* @var array * @var array
*/ */
protected $except = [ protected $except = [
//
]; ];
} }

View file

@ -68,8 +68,6 @@ class HMACAuthorization
/** /**
* Construct class instance. * Construct class instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {
@ -101,7 +99,6 @@ class HMACAuthorization
/** /**
* Checks that the Bearer token is provided and in a valid format. * Checks that the Bearer token is provided and in a valid format.
* *
* @return void
* *
* @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
*/ */
@ -126,7 +123,6 @@ class HMACAuthorization
* Determine if the request contains a valid public API key * Determine if the request contains a valid public API key
* as well as permissions for the resource. * as well as permissions for the resource.
* *
* @return void
* *
* @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
*/ */
@ -164,7 +160,6 @@ class HMACAuthorization
* Determine if the HMAC sent in the request matches the one generated * Determine if the HMAC sent in the request matches the one generated
* on the panel side. * on the panel side.
* *
* @return void
* *
* @throws \Symfony\Component\HttpKernel\Exception\BadRequestHttpException * @throws \Symfony\Component\HttpKernel\Exception\BadRequestHttpException
*/ */

View file

@ -6,5 +6,4 @@ use Illuminate\Foundation\Http\FormRequest;
abstract class Request extends FormRequest abstract class Request extends FormRequest
{ {
//
} }

View file

@ -45,8 +45,6 @@ class SendScheduledTask extends Job implements ShouldQueue
/** /**
* Create a new job instance. * Create a new job instance.
*
* @return void
*/ */
public function __construct(Task $task) public function __construct(Task $task)
{ {
@ -58,8 +56,6 @@ class SendScheduledTask extends Job implements ShouldQueue
/** /**
* Execute the job. * Execute the job.
*
* @return void
*/ */
public function handle() public function handle()
{ {
@ -96,7 +92,8 @@ class SendScheduledTask extends Job implements ShouldQueue
'response' => $ex->getMessage(), 'response' => $ex->getMessage(),
]); ]);
} finally { } finally {
$cron = Cron::factory(sprintf('%s %s %s %s %s %s', $cron = Cron::factory(sprintf(
'%s %s %s %s %s %s',
$this->task->minute, $this->task->minute,
$this->task->hour, $this->task->hour,
$this->task->day_of_month, $this->task->day_of_month,

View file

@ -90,8 +90,10 @@ class Service extends Model implements CleansAttributes, ValidableContract
public function packs() public function packs()
{ {
return $this->hasManyThrough( return $this->hasManyThrough(
'Pterodactyl\Models\Pack', 'Pterodactyl\Models\ServiceOption', 'Pterodactyl\Models\Pack',
'service_id', 'option_id' 'Pterodactyl\Models\ServiceOption',
'service_id',
'option_id'
); );
} }

View file

@ -186,7 +186,6 @@ class User extends Model implements
* *
* @param string $password * @param string $password
* @param string $regex * @param string $regex
* @return void
* @throws \Pterodactyl\Exceptions\DisplayException * @throws \Pterodactyl\Exceptions\DisplayException
* @deprecated * @deprecated
*/ */
@ -204,7 +203,6 @@ class User extends Model implements
* Send the password reset notification. * Send the password reset notification.
* *
* @param string $token * @param string $token
* @return void
*/ */
public function sendPasswordResetNotification($token) public function sendPasswordResetNotification($token)
{ {

View file

@ -44,7 +44,6 @@ class AccountCreated extends Notification implements ShouldQueue
* Create a new notification instance. * Create a new notification instance.
* *
* @param aray $user * @param aray $user
* @return void
*/ */
public function __construct(array $user) public function __construct(array $user)
{ {

View file

@ -42,7 +42,6 @@ class AddedToServer extends Notification implements ShouldQueue
* Create a new notification instance. * Create a new notification instance.
* *
* @param array $server * @param array $server
* @return void
*/ */
public function __construct(array $server) public function __construct(array $server)
{ {

View file

@ -42,7 +42,6 @@ class RemovedFromServer extends Notification implements ShouldQueue
* Create a new notification instance. * Create a new notification instance.
* *
* @param array $server * @param array $server
* @return void
*/ */
public function __construct(array $server) public function __construct(array $server)
{ {

View file

@ -44,7 +44,6 @@ class SendPasswordReset extends Notification implements ShouldQueue
* Create a new notification instance. * Create a new notification instance.
* *
* @param string $token * @param string $token
* @return void
*/ */
public function __construct($token) public function __construct($token)
{ {

View file

@ -42,7 +42,6 @@ class ServerCreated extends Notification implements ShouldQueue
* Create a new notification instance. * Create a new notification instance.
* *
* @param array $server * @param array $server
* @return void
*/ */
public function __construct(array $server) public function __construct(array $server)
{ {

View file

@ -38,7 +38,6 @@ class ServerObserver
* Listen to the Server creating event. * Listen to the Server creating event.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function creating(Server $server) public function creating(Server $server)
{ {
@ -49,7 +48,6 @@ class ServerObserver
* Listen to the Server created event. * Listen to the Server created event.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function created(Server $server) public function created(Server $server)
{ {
@ -70,7 +68,6 @@ class ServerObserver
* Listen to the Server deleting event. * Listen to the Server deleting event.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function deleting(Server $server) public function deleting(Server $server)
{ {
@ -81,7 +78,6 @@ class ServerObserver
* Listen to the Server deleted event. * Listen to the Server deleted event.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function deleted(Server $server) public function deleted(Server $server)
{ {
@ -92,7 +88,6 @@ class ServerObserver
* Listen to the Server saving event. * Listen to the Server saving event.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function saving(Server $server) public function saving(Server $server)
{ {
@ -103,7 +98,6 @@ class ServerObserver
* Listen to the Server saved event. * Listen to the Server saved event.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function saved(Server $server) public function saved(Server $server)
{ {
@ -114,7 +108,6 @@ class ServerObserver
* Listen to the Server updating event. * Listen to the Server updating event.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function updating(Server $server) public function updating(Server $server)
{ {
@ -125,7 +118,6 @@ class ServerObserver
* Listen to the Server saved event. * Listen to the Server saved event.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @return void
*/ */
public function updated(Server $server) public function updated(Server $server)
{ {

View file

@ -35,7 +35,6 @@ class SubuserObserver
* Listen to the Subuser creating event. * Listen to the Subuser creating event.
* *
* @param \Pterodactyl\Models\Subuser $subuser * @param \Pterodactyl\Models\Subuser $subuser
* @return void
*/ */
public function creating(Subuser $subuser) public function creating(Subuser $subuser)
{ {
@ -46,7 +45,6 @@ class SubuserObserver
* Listen to the Subuser created event. * Listen to the Subuser created event.
* *
* @param \Pterodactyl\Models\Subuser $subuser * @param \Pterodactyl\Models\Subuser $subuser
* @return void
*/ */
public function created(Subuser $subuser) public function created(Subuser $subuser)
{ {
@ -63,7 +61,6 @@ class SubuserObserver
* Listen to the Subuser deleting event. * Listen to the Subuser deleting event.
* *
* @param \Pterodactyl\Models\Subuser $subuser * @param \Pterodactyl\Models\Subuser $subuser
* @return void
*/ */
public function deleting(Subuser $subuser) public function deleting(Subuser $subuser)
{ {
@ -74,7 +71,6 @@ class SubuserObserver
* Listen to the Subuser deleted event. * Listen to the Subuser deleted event.
* *
* @param \Pterodactyl\Models\Subuser $subuser * @param \Pterodactyl\Models\Subuser $subuser
* @return void
*/ */
public function deleted(Subuser $subuser) public function deleted(Subuser $subuser)
{ {

View file

@ -41,7 +41,6 @@ class UserObserver
* Listen to the User creating event. * Listen to the User creating event.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @return void
*/ */
public function creating(User $user) public function creating(User $user)
{ {
@ -54,7 +53,6 @@ class UserObserver
* Listen to the User created event. * Listen to the User created event.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @return void
*/ */
public function created(User $user) public function created(User $user)
{ {
@ -65,7 +63,6 @@ class UserObserver
* Listen to the User deleting event. * Listen to the User deleting event.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @return void
*/ */
public function deleting(User $user) public function deleting(User $user)
{ {
@ -76,7 +73,6 @@ class UserObserver
* Listen to the User deleted event. * Listen to the User deleted event.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @return void
*/ */
public function deleted(User $user) public function deleted(User $user)
{ {

View file

@ -34,8 +34,6 @@ class AppServiceProvider extends ServiceProvider
{ {
/** /**
* Bootstrap any application services. * Bootstrap any application services.
*
* @return void
*/ */
public function boot() public function boot()
{ {
@ -49,8 +47,6 @@ class AppServiceProvider extends ServiceProvider
/** /**
* Register any application services. * Register any application services.
*
* @return void
*/ */
public function register() public function register()
{ {

View file

@ -20,7 +20,6 @@ class AuthServiceProvider extends ServiceProvider
* Register any application authentication / authorization services. * Register any application authentication / authorization services.
* *
* @param \Illuminate\Contracts\Auth\Access\Gate $gate * @param \Illuminate\Contracts\Auth\Access\Gate $gate
* @return void
*/ */
public function boot() public function boot()
{ {

View file

@ -9,8 +9,6 @@ class BroadcastServiceProvider extends ServiceProvider
{ {
/** /**
* Bootstrap any application services. * Bootstrap any application services.
*
* @return void
*/ */
public function boot() public function boot()
{ {

View file

@ -16,8 +16,6 @@ class EventServiceProvider extends ServiceProvider
/** /**
* Register any other events for your application. * Register any other events for your application.
*
* @return void
*/ */
public function boot() public function boot()
{ {

View file

@ -36,8 +36,6 @@ class MacroServiceProvider extends ServiceProvider
{ {
/** /**
* Bootstrap the application services. * Bootstrap the application services.
*
* @return void
*/ */
public function boot() public function boot()
{ {
@ -48,7 +46,7 @@ class MacroServiceProvider extends ServiceProvider
$i = 0; $i = 0;
while (($size / 1024) > 0.9) { while (($size / 1024) > 0.9) {
$size = $size / 1024; $size = $size / 1024;
$i++; ++$i;
} }
return round($size, ($i < 2) ? 0 : $precision) . ' ' . $units[$i]; return round($size, ($i < 2) ? 0 : $precision) . ' ' . $units[$i];

View file

@ -32,8 +32,6 @@ class PhraseAppTranslationProvider extends TranslationServiceProvider
{ {
/** /**
* Register the service provider. * Register the service provider.
*
* @return void
*/ */
public function register() public function register()
{ {

View file

@ -19,8 +19,6 @@ class RouteServiceProvider extends ServiceProvider
/** /**
* Define your route model bindings, pattern filters, etc. * Define your route model bindings, pattern filters, etc.
*
* @return void
*/ */
public function boot() public function boot()
{ {
@ -29,8 +27,6 @@ class RouteServiceProvider extends ServiceProvider
/** /**
* Define the routes for the application. * Define the routes for the application.
*
* @return void
*/ */
public function map() public function map()
{ {

View file

@ -85,7 +85,8 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
public function createDatabase($database, $connection = null) public function createDatabase($database, $connection = null)
{ {
return $this->runStatement( return $this->runStatement(
sprintf('CREATE DATABASE IF NOT EXISTS `%s`', $database), $connection sprintf('CREATE DATABASE IF NOT EXISTS `%s`', $database),
$connection
); );
} }
@ -95,7 +96,8 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
public function createUser($username, $remote, $password, $connection = null) public function createUser($username, $remote, $password, $connection = null)
{ {
return $this->runStatement( return $this->runStatement(
sprintf('CREATE USER `%s`@`%s` IDENTIFIED BY \'%s\'', $username, $remote, $password), $connection sprintf('CREATE USER `%s`@`%s` IDENTIFIED BY \'%s\'', $username, $remote, $password),
$connection
); );
} }
@ -107,7 +109,9 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
return $this->runStatement( return $this->runStatement(
sprintf( sprintf(
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON `%s`.* TO `%s`@`%s`', 'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON `%s`.* TO `%s`@`%s`',
$database, $username, $remote $database,
$username,
$remote
), ),
$connection $connection
); );
@ -127,7 +131,8 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
public function dropDatabase($database, $connection = null) public function dropDatabase($database, $connection = null)
{ {
return $this->runStatement( return $this->runStatement(
sprintf('DROP DATABASE IF EXISTS `%s`', $database), $connection sprintf('DROP DATABASE IF EXISTS `%s`', $database),
$connection
); );
} }
@ -137,7 +142,8 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
public function dropUser($username, $remote, $connection = null) public function dropUser($username, $remote, $connection = null)
{ {
return $this->runStatement( return $this->runStatement(
sprintf('DROP USER IF EXISTS `%s`@`%s`', $username, $remote), $connection sprintf('DROP USER IF EXISTS `%s`@`%s`', $username, $remote),
$connection
); );
} }

View file

@ -47,7 +47,10 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
public function getUsageStats($id) public function getUsageStats($id)
{ {
$node = $this->getBuilder()->select( $node = $this->getBuilder()->select(
'nodes.disk_overallocate', 'nodes.memory_overallocate', 'nodes.disk', 'nodes.memory', 'nodes.disk_overallocate',
'nodes.memory_overallocate',
'nodes.disk',
'nodes.memory',
$this->getBuilder()->raw('SUM(servers.memory) as sum_memory, SUM(servers.disk) as sum_disk') $this->getBuilder()->raw('SUM(servers.memory) as sum_memory, SUM(servers.disk) as sum_disk')
)->join('servers', 'servers.node_id', '=', 'nodes.id') )->join('servers', 'servers.node_id', '=', 'nodes.id')
->where('nodes.id', $id) ->where('nodes.id', $id)

View file

@ -72,7 +72,8 @@ class UserRepository extends EloquentRepository implements UserRepositoryInterfa
} }
return $users->paginate( return $users->paginate(
$this->config->get('pterodactyl.paginate.admin.users'), $this->getColumns() $this->config->get('pterodactyl.paginate.admin.users'),
$this->getColumns()
); );
} }

View file

@ -153,7 +153,6 @@ class SubuserRepository
* Revokes a users permissions on a server. * Revokes a users permissions on a server.
* *
* @param int $id * @param int $id
* @return void
* *
* @throws \Pterodactyl\Exceptions\DisplayException * @throws \Pterodactyl\Exceptions\DisplayException
*/ */
@ -195,7 +194,6 @@ class SubuserRepository
* *
* @param int $id * @param int $id
* @param array $data * @param array $data
* @return void
* *
* @throws \Pterodactyl\Exceptions\DisplayException * @throws \Pterodactyl\Exceptions\DisplayException
* @throws \Pterodactyl\Exceptions\DisplayValidationException * @throws \Pterodactyl\Exceptions\DisplayValidationException

View file

@ -77,7 +77,8 @@ abstract class Repository implements RepositoryInterface
} }
return $this->model = call_user_func( return $this->model = call_user_func(
$model[1], $this->app->make($model[0]) $model[1],
$this->app->make($model[0])
); );
} }

View file

@ -50,7 +50,6 @@ class CommandRepository
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @param \Pterodactyl\Models\User|null $user * @param \Pterodactyl\Models\User|null $user
* @return void
*/ */
public function __construct(Server $server, User $user = null) public function __construct(Server $server, User $user = null)
{ {

View file

@ -43,7 +43,6 @@ class FileRepository
* Constructor. * Constructor.
* *
* @param string $uuid * @param string $uuid
* @return void
*/ */
public function __construct($uuid) public function __construct($uuid)
{ {

View file

@ -50,7 +50,6 @@ class PowerRepository
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @param \Pterodactyl\Models\User|null $user * @param \Pterodactyl\Models\User|null $user
* @return void
*/ */
public function __construct(Server $server, User $user = null) public function __construct(Server $server, User $user = null)
{ {
@ -89,8 +88,6 @@ class PowerRepository
/** /**
* Starts a server. * Starts a server.
*
* @return void
*/ */
public function start() public function start()
{ {
@ -99,8 +96,6 @@ class PowerRepository
/** /**
* Stops a server. * Stops a server.
*
* @return void
*/ */
public function stop() public function stop()
{ {
@ -109,8 +104,6 @@ class PowerRepository
/** /**
* Restarts a server. * Restarts a server.
*
* @return void
*/ */
public function restart() public function restart()
{ {
@ -119,8 +112,6 @@ class PowerRepository
/** /**
* Kills a server. * Kills a server.
*
* @return void
*/ */
public function kill() public function kill()
{ {

View file

@ -96,10 +96,16 @@ class DatabaseManagementService
$this->repository->createDatabase($database->database, 'dynamic'); $this->repository->createDatabase($database->database, 'dynamic');
$this->repository->createUser( $this->repository->createUser(
$database->username, $database->remote, $this->encrypter->decrypt($database->password), 'dynamic' $database->username,
$database->remote,
$this->encrypter->decrypt($database->password),
'dynamic'
); );
$this->repository->assignUserToDatabase( $this->repository->assignUserToDatabase(
$database->database, $database->username, $database->remote, 'dynamic' $database->database,
$database->username,
$database->remote,
'dynamic'
); );
$this->repository->flush('dynamic'); $this->repository->flush('dynamic');
@ -148,7 +154,10 @@ class DatabaseManagementService
$this->repository->dropUser($database->username, $database->remote, 'dynamic'); $this->repository->dropUser($database->username, $database->remote, 'dynamic');
$this->repository->createUser($database->username, $database->remote, $password, 'dynamic'); $this->repository->createUser($database->username, $database->remote, $password, 'dynamic');
$this->repository->assignUserToDatabase( $this->repository->assignUserToDatabase(
$database->database, $database->username, $database->remote, 'dynamic' $database->database,
$database->username,
$database->remote,
'dynamic'
); );
$this->repository->flush('dynamic'); $this->repository->flush('dynamic');

View file

@ -36,7 +36,6 @@ class APILogService
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param null|string $error * @param null|string $error
* @param bool $authorized * @param bool $authorized
* @return void
*/ */
public static function log(Request $request, $error = null, $authorized = false) public static function log(Request $request, $error = null, $authorized = false)
{ {

View file

@ -71,7 +71,6 @@ class DeploymentService
* Set the location to use when auto-deploying. * Set the location to use when auto-deploying.
* *
* @param int|\Pterodactyl\Models\Location $location * @param int|\Pterodactyl\Models\Location $location
* @return void
*/ */
public function setLocation($location) public function setLocation($location)
{ {
@ -91,7 +90,6 @@ class DeploymentService
* Set the node to use when auto-deploying. * Set the node to use when auto-deploying.
* *
* @param int|\Pterodactyl\Models\Node $node * @param int|\Pterodactyl\Models\Node $node
* @return void
*/ */
public function setNode($node) public function setNode($node)
{ {
@ -109,7 +107,6 @@ class DeploymentService
* Set the amount of disk space to be used by the new server. * Set the amount of disk space to be used by the new server.
* *
* @param int $disk * @param int $disk
* @return void
*/ */
public function setDisk(int $disk) public function setDisk(int $disk)
{ {
@ -122,7 +119,6 @@ class DeploymentService
* Set the amount of memory to be used by the new server. * Set the amount of memory to be used by the new server.
* *
* @param int $memory * @param int $memory
* @return void
*/ */
public function setMemory(int $memory) public function setMemory(int $memory)
{ {
@ -135,7 +131,6 @@ class DeploymentService
* Return a random location model. * Return a random location model.
* *
* @param array $exclude * @param array $exclude
* @return void;
*/ */
protected function findLocation(array $exclude = []) protected function findLocation(array $exclude = [])
{ {
@ -154,8 +149,6 @@ class DeploymentService
/** /**
* Return a model instance of a random node. * Return a model instance of a random node.
*
* @return void;
*/ */
protected function findNode(array $exclude = []) protected function findNode(array $exclude = [])
{ {
@ -240,8 +233,6 @@ class DeploymentService
/** /**
* Select and return the node to be used by the auto-deployment system. * Select and return the node to be used by the auto-deployment system.
*
* @return void
*/ */
public function select() public function select()
{ {

View file

@ -38,8 +38,6 @@ class VersionService
/** /**
* Version constructor. * Version constructor.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View file

@ -103,7 +103,8 @@ class PackCreationService
$this->connection->beginTransaction(); $this->connection->beginTransaction();
$pack = $this->repository->create(array_merge( $pack = $this->repository->create(array_merge(
['uuid' => Uuid::uuid4()], $data ['uuid' => Uuid::uuid4()],
$data
)); ));
$this->storage->disk()->makeDirectory('packs/' . $pack->uuid); $this->storage->disk()->makeDirectory('packs/' . $pack->uuid);

View file

@ -93,7 +93,8 @@ class SuspensionService
if (! in_array($action, ['suspend', 'unsuspend'])) { if (! in_array($action, ['suspend', 'unsuspend'])) {
throw new \InvalidArgumentException(sprintf( throw new \InvalidArgumentException(sprintf(
'Action must be either suspend or unsuspend, %s passed.', $action 'Action must be either suspend or unsuspend, %s passed.',
$action
)); ));
} }

View file

@ -68,7 +68,8 @@ class VariableCreationService
if (in_array(strtoupper(array_get($data, 'env_variable')), explode(',', ServiceVariable::RESERVED_ENV_NAMES))) { if (in_array(strtoupper(array_get($data, 'env_variable')), explode(',', ServiceVariable::RESERVED_ENV_NAMES))) {
throw new ReservedVariableNameException(sprintf( throw new ReservedVariableNameException(sprintf(
'Cannot use the protected name %s for this environment variable.', array_get($data, 'env_variable') 'Cannot use the protected name %s for this environment variable.',
array_get($data, 'env_variable')
)); ));
} }

Some files were not shown because too many files have changed in this diff Show more