name: lint

on: [push, pull_request]

jobs:

  lint:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        php: [8.1, 8.0, 7.4, 7.3]
        stability: [prefer-lowest, prefer-stable]
    name: lint on PHP ${{ matrix.php }}@${{ matrix.stability }}
    steps:
      - uses: actions/checkout@v2
      - uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
      - run: find . -type f -name '*.php' -exec php -l {} \;
