/** *Lint a PHP script * *@author Learninpage.com, Inc. sam@readinga-z.com *@version 1 Mar 30, 2004 */ void execScript(interpreter, command) { params = Macros.input(view, "Specify parameters for running script under " + interpreter); if(params == null) { Macros.message(view, "Script execution was cancelled."); return; } runInSystemShell(view, command + params); } void phpLint() { if(buffer.isNewFile()) buffer.saveAs(view, true); else buffer.save(view, buffer.getPath()); mode = buffer.getMode().getName(); path = buffer.getPath() + " "; if(mode.equals("php") || mode.equals("html")) { execScript("php", "php -l " + path); } } phpLint();