I’m trying to use PHP_CodeSniffer to sniff the problems in a php file according to the zend coding standards.
The problem is some of the basic rules are not detected, for example
String Literals
$a = "Example String";
should give a warning because the standard is
$a = 'Example String';
Am I missing something, is this not part of the code standard ?
It is part of the Zend Coding Standard according to the respective pages in the ZF Reference Guide. However, that does not necessarily mean all these rules have been included in phpcs. They are unrelated projects. If you look at the ruleset defined for ZF in phpcs, you will see this notice right on top:
Judging by a comment by Thomas Weidner in the Wiki for ZF Coding Standards, there is currently no up-to-date PHPCS ruleset available: