diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index a5b05817b..eab19fbe7 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -25,3 +25,25 @@ jobs: - name: Run PHPStan run: ./vendor/bin/phpstan analyse --error-format=github + + phpcsfixer: + name: Checkstyle + runs-on: ubuntu-latest + timeout-minutes: 6 + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + coverage: none + + - name: Install composer dependencies + run: "composer install --no-interaction --no-progress --no-scripts" + + - name: Run PHP-CS-Fixer + run: ./vendor/bin/php-cs-fixer check --diff diff --git a/app/Http/Controllers/UrlController.php b/app/Http/Controllers/UrlController.php index 5d5f514ad..d6c5110fc 100644 --- a/app/Http/Controllers/UrlController.php +++ b/app/Http/Controllers/UrlController.php @@ -7,6 +7,7 @@ use App\Models\Visit; use App\Services\QrCodeService; use App\Services\UHubLinkService; +use App\Test; class UrlController extends Controller {