Bug #19402 [Com]: syntax error when executing phpcs

From: Date: Sat, 12 May 2012 18:14:31 +0000
Subject: Bug #19402 [Com]: syntax error when executing phpcs
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8650@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19402&edit=1 ID: 19402 Comment by: AWTrost@gmail.com Reported By: brandon dot mull at solohealth dot com Summary: syntax error when executing phpcs Status: Assigned Type: Bug Package: PHP_CodeSniffer Operating System: Windows 7 Package Version: 1.3.3 PHP Version: 5.3.9 Assigned To: squiz Roadmap Versions: New Comment: PHP 5.3.8 (cli) (built: Aug 23 2011 11:50:20) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies Windows 7 Professional Service pack 1 Previous Comments: ------------------------------------------------------------------------ [2012-05-12 18:48:17] tkli Which windows and which PHP version are you running? ------------------------------------------------------------------------ [2012-05-11 06:43:05] squiz -Status: Feedback +Status: Assigned ------------------------------------------------------------------------ [2012-05-04 02:47:30] awtrost I have the same issue. It happens when I run phpcs on any php file, or by just running it by itself. I just ran phpcs -h and it did it again. The odd thing is that if I just press ok on the alert box, phpcs continues on like there wasn't an issue (reports errors for the file given, prints out the phpcs help info etc. ). Not sure if this printout is what you were asking for, but here is the print out when i run phpcs -h: Alert box that contains "syntax error, unexpected '(' in Unknown on line 9" Usage: phpcs [-nwlsapvi] [-d key[=value]] [--report=<report>] [--report-file=<reportfile>] [--report-<report>=<reportf ile>] ... [--report-width=<reportWidth>] [--generator=<generator>] [--tab-width=<tabWi dth>] [--severity=<severity>] [--error-severity=<severity>] [--warning-severity=<s everity>] [--config-set key value] [--config-delete key] [--config-show] [--standard=<standard>] [--sniffs=<sniffs>] [--encoding=<encoding>] [--extensions=<extensions>] [--ignore=<patterns>] <file> ... -n Do not print warnings (shortcut for --warning-severity=0) -w Print both warnings and errors (on by default) -l Local directory only, no recursion -s Show sniff codes in all reports -a Run interactively -p Show progress of the run -v[v][v] Print verbose output -i Show a list of installed coding standards -d Set the [key] php.ini value to [value] or [true] if value is omitted --help Print this help message --version Print version information <file> One or more files and/or directories to check <extensions> A comma separated list of file extensions to check (only valid if checking a directory) <patterns> A comma separated list of patterns to ignore files and dir ectories <encoding> The encoding of the files being checked (default is iso-88 59-1) <sniffs> A comma separated list of sniff codes to limit the check t o (all sniffs must be part of the specified standard) <severity> The minimum severity required to display an error or warni ng <standard> The name or path of the coding standard to use <tabWidth> The number of spaces each tab represents <generator> The name of a doc generator to use (forces doc generation instead of checking) <report> Print either the "full", "xml", "checkstyle", "csv", "emac s" "source", "summary", "svnblame", "gitblame" or "hgblame" r eport (the "full" report is printed by default) <reportfile> Write the report to the specified file path <reportWidth> How many columns wide screen reports should be printed ------------------------------------------------------------------------ [2012-04-27 22:41:21] squiz -Status: Open +Status: Feedback -Assigned To: +Assigned To: squiz What code are you running PHPCS on? Running the phpcs command by itself is just going to wait for user input, so the whole command you used or the output from "phpcs -h" would be helpful please. ------------------------------------------------------------------------ [2012-04-27 21:26:55] brandonmull Description: ------------ syntax error in unknown script interrupts code sniffer Recently installed PHP_CodeSniffer. No errors during install. Did not install optional dependency "phpunit/PHP_Timer". Tried running code sniffer from command line and got alert box warning of syntax error. Test script: --------------- From command line > phpcs Actual result: -------------- alert box ---------------------------- title - PHP Error message - syntax error, unexpected '(' in Unknown on line 9 ---------------------------- ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19402&edit=1

« previous php.pear.bugs (#8650) next »