5

When I try to open a file in PHPStorm(10.0.3) getting following message.

phpcs: PHP Fatal error: Call to undefined method PHP_CodeSniffer_File::recordMetric() in /usr/share/php/PHP/CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php on line 91

Is anyone know whats this?

KKK
  • 1,652
  • 7
  • 29
  • 49

1 Answers1

3

Upgrading Code Sniffer fixed this error for me.

I had a similar error and found that I was using an old version (1.5) of code sniffer. I then used pear to install it and now am on version 2.5.1 and the error is gone.

Not sure what OS you are using but for Ubuntu I used:

pear install --alldeps php_codesniffer
Anthony
  • 61
  • 5