[TYPO3-50-general] Willing to help Task #1 Create sniffs for PHP Code Sniffer

Sebastian Kurfuerst sebastian at typo3.org
Mon Dec 10 10:23:15 CET 2007

Hey Tim,

> Now there is a little chance to give something back to the community, so
> i decided to try to help.
> Back to topic:
> I took a look at the coding guidelines and at PHP Code Sniffer. I should
> say that i am an average PHP Coder, but never heard of the Sniffer or
> PHPUnit before. I took a look at the PHPUnit docs, but i don't really
> understand how PHPUnit could help in this task. ...and what the hell is
> phing and how is it used in the 5.0 project? (the phing doc is really
> huge. i began to read it, but didn't understand even the first parts
> till now)
The idea is that we have Unit Tests (PHPUnit) which test if the code
sniffer rules work correctly.
The tests would consist of some fixtures, that are classes which are
style-checked by the sniffer - where you know if they contain errors or
not. So you would test the correctness of your Sniffs with phpunit.

Phing is a build tool we use for automatic packaging. It is like "make"
for C, or "ant" for java.
So phing integration is not first priority, I can help you out with that
as well :-)

> I extracted "rules" out of the guidelines and tried to set a priority to
> it. Some of them are never possible to check with Sniffer (take nouns
> for class names for example), some of them sound easy, but are difficult
> to implement and some of them are very fast to implement.
> i experimented a bit and already implemented 'Class name start with T3_'
> and 'Class name only content A-Za-z0-9 and _'.
That's great! If you want to, you can upload an intermediate version,
then we could have a look :)


More information about the TYPO3-project-5_0-general mailing list