Run php-cs-fixer

This commit is contained in:
Dane Everitt 2021-08-15 17:20:36 -07:00
parent d1199e59e6
commit 25d9ba4779
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
21 changed files with 30 additions and 38 deletions

View file

@ -3,7 +3,15 @@
use PhpCsFixer\Config; use PhpCsFixer\Config;
use PhpCsFixer\Finder; use PhpCsFixer\Finder;
$finder = (new Finder())->in(__DIR__)->exclude(['vendor', 'node_modules', 'storage', 'bootstrap/cache']); $finder = (new Finder())
->in(__DIR__)
->exclude([
'vendor',
'node_modules',
'storage',
'bootstrap/cache',
])
->notName(['_ide_helper*']);
return (new Config()) return (new Config())
->setRiskyAllowed(true) ->setRiskyAllowed(true)

View file

@ -11,8 +11,8 @@ use Pterodactyl\Models\Permission;
use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Auth\Access\AuthorizationException;
use Pterodactyl\Services\Backups\DeleteBackupService; use Pterodactyl\Services\Backups\DeleteBackupService;
use Pterodactyl\Services\Backups\DownloadLinkService; use Pterodactyl\Services\Backups\DownloadLinkService;
use Pterodactyl\Services\Backups\InitiateBackupService;
use Pterodactyl\Repositories\Eloquent\BackupRepository; use Pterodactyl\Repositories\Eloquent\BackupRepository;
use Pterodactyl\Services\Backups\InitiateBackupService;
use Pterodactyl\Repositories\Wings\DaemonBackupRepository; use Pterodactyl\Repositories\Wings\DaemonBackupRepository;
use Pterodactyl\Transformers\Api\Client\BackupTransformer; use Pterodactyl\Transformers\Api\Client\BackupTransformer;
use Pterodactyl\Http\Controllers\Api\Client\ClientApiController; use Pterodactyl\Http\Controllers\Api\Client\ClientApiController;

View file

@ -12,14 +12,8 @@ use Pterodactyl\Http\Requests\Api\Client\Servers\GetServerRequest;
class ResourceUtilizationController extends ClientApiController class ResourceUtilizationController extends ClientApiController
{ {
/**
* @var \Pterodactyl\Repositories\Wings\DaemonServerRepository
*/
private DaemonServerRepository $repository; private DaemonServerRepository $repository;
/**
* @var \Illuminate\Cache\Repository
*/
private Repository $cache; private Repository $cache;
/** /**

View file

@ -93,7 +93,6 @@ class ServerDetailsController extends Controller
* do not get incorrectly stuck in installing/restoring from backup states since * do not get incorrectly stuck in installing/restoring from backup states since
* a Wings reboot would completely stop those processes. * a Wings reboot would completely stop those processes.
* *
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
* *
* @throws \Throwable * @throws \Throwable

View file

@ -8,9 +8,9 @@ use Pterodactyl\Models\Server;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Pterodactyl\Http\Controllers\Controller; use Pterodactyl\Http\Controllers\Controller;
use Pterodactyl\Repositories\Eloquent\ServerRepository; use Pterodactyl\Repositories\Eloquent\ServerRepository;
use Pterodactyl\Http\Requests\Api\Remote\InstallationDataRequest;
use Pterodactyl\Events\Server\Installed as ServerInstalled; use Pterodactyl\Events\Server\Installed as ServerInstalled;
use Illuminate\Contracts\Events\Dispatcher as EventDispatcher; use Illuminate\Contracts\Events\Dispatcher as EventDispatcher;
use Pterodactyl\Http\Requests\Api\Remote\InstallationDataRequest;
class ServerInstallController extends Controller class ServerInstallController extends Controller
{ {

View file

@ -38,8 +38,6 @@ class BackupRepository extends EloquentRepository
/** /**
* Returns a query filtering only non-failed backups for a specific server. * Returns a query filtering only non-failed backups for a specific server.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/ */
public function getNonFailedBackups(Server $server): HasMany public function getNonFailedBackups(Server $server): HasMany
{ {

View file

@ -9,7 +9,6 @@ use Pterodactyl\Models\Backup;
use Pterodactyl\Models\Server; use Pterodactyl\Models\Server;
use Illuminate\Database\ConnectionInterface; use Illuminate\Database\ConnectionInterface;
use Pterodactyl\Extensions\Backups\BackupManager; use Pterodactyl\Extensions\Backups\BackupManager;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Pterodactyl\Repositories\Eloquent\BackupRepository; use Pterodactyl\Repositories\Eloquent\BackupRepository;
use Pterodactyl\Repositories\Wings\DaemonBackupRepository; use Pterodactyl\Repositories\Wings\DaemonBackupRepository;
use Pterodactyl\Exceptions\Service\Backup\TooManyBackupsException; use Pterodactyl\Exceptions\Service\Backup\TooManyBackupsException;
@ -55,11 +54,7 @@ class InitiateBackupService
/** /**
* InitiateBackupService constructor. * InitiateBackupService constructor.
* *
* @param \Pterodactyl\Repositories\Eloquent\BackupRepository $repository
* @param \Illuminate\Database\ConnectionInterface $connection
* @param \Pterodactyl\Repositories\Wings\DaemonBackupRepository $daemonBackupRepository
* @param \Pterodactyl\Services\Backups\DeleteBackupService $deleteBackupService * @param \Pterodactyl\Services\Backups\DeleteBackupService $deleteBackupService
* @param \Pterodactyl\Extensions\Backups\BackupManager $backupManager
*/ */
public function __construct( public function __construct(
BackupRepository $repository, BackupRepository $repository,

View file

@ -111,7 +111,7 @@ return [
'options' => [ 'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'), 'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
], ],
'default' => [ 'default' => [

View file

@ -16,7 +16,7 @@ return [
'mailgun' => [ 'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'), 'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'), 'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT') 'endpoint' => env('MAILGUN_ENDPOINT'),
], ],
'mandrill' => [ 'mandrill' => [

View file

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddIndexForServerAndAction extends Migration class AddIndexForServerAndAction extends Migration
{ {

View file

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class MakeSftpPortUnsignedInt extends Migration class MakeSftpPortUnsignedInt extends Migration
{ {

View file

@ -1,9 +1,9 @@
<?php <?php
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ForceCronMonthFieldToHaveValueIfMissing extends Migration class ForceCronMonthFieldToHaveValueIfMissing extends Migration
{ {

View file

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddContinueOnFailureOptionToTasks extends Migration class AddContinueOnFailureOptionToTasks extends Migration
{ {

View file

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddOnlyRunWhenServerOnlineOptionToSchedules extends Migration class AddOnlyRunWhenServerOnlineOptionToSchedules extends Migration
{ {

View file

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddSupportForLockingABackup extends Migration class AddSupportForLockingABackup extends Migration
{ {

View file

@ -7,6 +7,7 @@ class RemoveUserInteraction extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void * @return void
*/ */
public function up() public function up()

View file

@ -6,7 +6,6 @@ use ReflectionClass;
use Pterodactyl\Models\Node; use Pterodactyl\Models\Node;
use Pterodactyl\Models\Task; use Pterodactyl\Models\Task;
use Pterodactyl\Models\User; use Pterodactyl\Models\User;
use Webmozart\Assert\Assert;
use InvalidArgumentException; use InvalidArgumentException;
use Pterodactyl\Models\Backup; use Pterodactyl\Models\Backup;
use Pterodactyl\Models\Server; use Pterodactyl\Models\Server;

View file

@ -89,7 +89,7 @@ class CreateServerScheduleTaskTest extends ClientApiIntegrationTestCase
} }
/** /**
* Test that backups can not be tasked when the backup limit is 0 * Test that backups can not be tasked when the backup limit is 0.
*/ */
public function testBackupsCanNotBeTaskedIfLimit0() public function testBackupsCanNotBeTaskedIfLimit0()
{ {

View file

@ -3,12 +3,11 @@
namespace Pterodactyl\Tests\Integration\Jobs\Schedule; namespace Pterodactyl\Tests\Integration\Jobs\Schedule;
use Mockery; use Mockery;
use Exception;
use Carbon\CarbonImmutable; use Carbon\CarbonImmutable;
use Pterodactyl\Models\Task;
use GuzzleHttp\Psr7\Request; use GuzzleHttp\Psr7\Request;
use InvalidArgumentException; use Pterodactyl\Models\Task;
use GuzzleHttp\Psr7\Response; use GuzzleHttp\Psr7\Response;
use InvalidArgumentException;
use Pterodactyl\Models\Server; use Pterodactyl\Models\Server;
use Pterodactyl\Models\Schedule; use Pterodactyl\Models\Schedule;
use Illuminate\Support\Facades\Bus; use Illuminate\Support\Facades\Bus;

View file

@ -8,7 +8,6 @@ use GuzzleHttp\Psr7\Response;
use Pterodactyl\Models\Server; use Pterodactyl\Models\Server;
use Pterodactyl\Models\Allocation; use Pterodactyl\Models\Allocation;
use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Exception\TransferException;
use Pterodactyl\Exceptions\DisplayException; use Pterodactyl\Exceptions\DisplayException;
use Pterodactyl\Tests\Integration\IntegrationTestCase; use Pterodactyl\Tests\Integration\IntegrationTestCase;
use Pterodactyl\Repositories\Wings\DaemonServerRepository; use Pterodactyl\Repositories\Wings\DaemonServerRepository;