当我输入 phpcs --version 时,我得到的不是版本号,而是这样的:
/Applications/drupal/php/bin/phpcs: line 2: ?php: No such file or directory
/Applications/drupal/php/bin/phpcs: line 3: /Applications: is a directory
/Applications/drupal/php/bin/phpcs: line 4: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 5: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 6: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 7: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 8: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 9: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 10: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 11: syntax error near unexpected token `newline'
/Applications/drupal/php/bin/phpcs: line 11: ` * @author Greg Sherwood <gsherwood@squiz.net>'
看起来它没有正确读取 PHP。我配置错了什么?
我所做的只是 sudo pear install PHP_CodeSniffer。当我再次运行它时,我得到:
pear/PHP_CodeSniffer 已安装,与发布的版本 1.3.5 相同