From 5f57e63fe484cb649c64b745fb1250dc6d53b1e4 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Wed, 26 Oct 2022 10:45:43 -0600 Subject: [PATCH 1/2] ci(lint): install composer dependencies --- .github/workflows/lint.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 709af4364..4ac292b68 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -21,9 +21,16 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: "8.1" + extensions: bcmath, curl, gd, mbstring, mysql, openssl, pdo, tokenizer, xml, zip tools: composer:v2 coverage: none + - name: Setup .env + run: cp .env.ci .env + + - name: Install dependencies + run: composer install --no-interaction --no-progress --no-suggest --prefer-dist + - name: PHP CS Fixer run: vendor/bin/php-cs-fixer fix --dry-run --diff From 548affba84f3478186fb926dd122d9060dc3bcbd Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Sat, 29 Oct 2022 19:58:55 -0400 Subject: [PATCH 2/2] Fix linting (#4504) --- app/Http/Controllers/Admin/Servers/ServerTransferController.php | 2 +- app/Models/Model.php | 2 +- app/Models/UserSSHKey.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Admin/Servers/ServerTransferController.php b/app/Http/Controllers/Admin/Servers/ServerTransferController.php index cdb2bb557..096217418 100644 --- a/app/Http/Controllers/Admin/Servers/ServerTransferController.php +++ b/app/Http/Controllers/Admin/Servers/ServerTransferController.php @@ -4,8 +4,8 @@ namespace Pterodactyl\Http\Controllers\Admin\Servers; use Illuminate\Http\Request; use Pterodactyl\Models\Server; -use Prologue\Alerts\AlertsMessageBag; use Illuminate\Http\RedirectResponse; +use Prologue\Alerts\AlertsMessageBag; use Pterodactyl\Models\ServerTransfer; use Pterodactyl\Http\Controllers\Controller; use Pterodactyl\Services\Servers\TransferService; diff --git a/app/Models/Model.php b/app/Models/Model.php index c5bc666d1..2e371d9d9 100644 --- a/app/Models/Model.php +++ b/app/Models/Model.php @@ -2,9 +2,9 @@ namespace Pterodactyl\Models; +use Carbon\CarbonImmutable; use Illuminate\Support\Arr; use Illuminate\Support\Str; -use Carbon\CarbonImmutable; use Illuminate\Support\Carbon; use Illuminate\Validation\Rule; use Illuminate\Container\Container; diff --git a/app/Models/UserSSHKey.php b/app/Models/UserSSHKey.php index 0aac52310..fb3c8f395 100644 --- a/app/Models/UserSSHKey.php +++ b/app/Models/UserSSHKey.php @@ -32,6 +32,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; * @method static \Illuminate\Database\Eloquent\Builder|UserSSHKey whereUserId($value) * @method static \Illuminate\Database\Query\Builder|UserSSHKey withTrashed() * @method static \Illuminate\Database\Query\Builder|UserSSHKey withoutTrashed() + * * @mixin \Eloquent * * @method static \Database\Factories\UserSSHKeyFactory factory(...$parameters)