HEX
Server: LiteSpeed
System: Linux us-phx-web629.main-hosting.eu 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 12 05:52:18 EST 2025 x86_64
User: u756937133 (756937133)
PHP: 8.2.30
Disabled: passthru,chgrp
Upload Files
File: //opt/.wp-cli/packages/vendor/composer/semver/.github/workflows/lint.yml
name: "PHP Lint"

on:
  - push
  - pull_request

permissions:
  contents: read

jobs:
  tests:
    name: "Lint"

    runs-on: ubuntu-latest

    strategy:
      matrix:
        php-version:
          - "5.3"
          - "7.4"
          - "nightly"

    steps:
      - uses: actions/checkout@v4

      - uses: shivammathur/setup-php@v2
        with:
          php-version: "${{ matrix.php-version }}"
          coverage: none

      - name: "Lint PHP files"
        run: |
          hasErrors=0
          for f in $(find src/ tests/ -type f -name '*.php' ! -path '*/vendor/*' ! -path '*/Fixtures/*')
          do
            { error="$(php -derror_reporting=-1 -ddisplay_errors=1 -l -f $f 2>&1 1>&3 3>&-)"; } 3>&1;
            if [ "$error" != "" ]; then
              while IFS= read -r line; do echo "::error file=$f::$line"; done <<< "$error"
              hasErrors=1
            fi
          done
          if [ $hasErrors -eq 1 ]; then
            exit 1
          fi