PHP_CodeSniffer missing Zend standards?

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:

A coding standard based on an early Zend Framework coding standard. Note that this standard is out of date.

Judging by a comment by Thomas Weidner in the Wiki for ZF Coding Standards, there is currently no up-to-date PHPCS ruleset available:

My code sniffer implementation was not finished but it has also not been accepted by Zend. Several rules did not conform, were not checked, or were too strict. I had to delete it from Incubator. You can find the latest version by looking into SVN (

The CS files delivered with PHPCS do not conform any ZF standard.

I was said that Zend will not integrate a own CS testbed as it will use the new Pear2 standard as soon as it's available. This is the reason why I did not do any additional work since last year.

So the actual state is that there is no official CS testbed available.

Need Your Help

Android socket still can write without exception when wifi has been disconnected

android sockets wifi

I write an Android socket demo which just post user's input to server.

Syntax for Entity Framework .Include()

.net linq entity-framework

I am going crazy trying to get a handle on Linq include.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.