name: Static Analysis

on: [push, pull_request]

jobs:
  tests:
    name: PHPStan

    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          coverage: none
          php-version: 8.2

      - name: Install Composer dependencies
        uses: ramsey/composer-install@v2

      - name: PHPStan
        run: vendor/bin/phpstan analyse --error-format=github
