Skip to content

Update README.md

Update README.md #7

Workflow file for this run

name: Lint
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.3', '7.4', '8.0', '8.1', '8.2']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Lint
run: |
error=0
for file in $(find src -type f -name "*.php"); do
php -l -n $file | grep -v "No syntax errors detected" && error=1
done
if [ $error -eq 1 ]; then
echo "Syntax errors were found."
exit 1
else
echo "No syntax errors were detected."
fi