Syntax Checking..."; function check_syntax($file) { if (!file_exists($file)) { echo "

$file: NOT FOUND

"; return; } // Test if file can be parsed $command = "php -l " . escapeshellarg($file); $output = shell_exec($command); if (strpos($output, 'No syntax errors detected') !== false) { echo "

$file: OK

"; } else { echo "

$file: SYNTAX ERROR!

$output

"; } } check_syntax(__DIR__ . '/../app/Helpers/helper.php'); check_syntax(__DIR__ . '/../app/Providers/AppServiceProvider.php'); check_syntax(__DIR__ . '/../app/Http/Controllers/AttendanceRecordController.php'); check_syntax(__DIR__ . '/../app/Http/Controllers/LeavePolicyController.php'); check_syntax(__DIR__ . '/../bootstrap/app.php'); check_syntax(__DIR__ . '/../public/repair-cache.php');