1#!/bin/bash 2# Check PHP syntax of all calendar plugin files 3 4echo "Checking PHP syntax..." 5echo "" 6 7errors=0 8 9for file in *.php; do 10 if [ -f "$file" ]; then 11 result=$(php -l "$file" 2>&1) 12 if [ $? -eq 0 ]; then 13 echo "✅ $file" 14 else 15 echo "❌ $file" 16 echo " $result" 17 errors=$((errors + 1)) 18 fi 19 fi 20done 21 22echo "" 23if [ $errors -eq 0 ]; then 24 echo "✅ All PHP files are valid!" 25 exit 0 26else 27 echo "❌ Found $errors file(s) with syntax errors" 28 exit 1 29fi 30