How to sniff our CakePHP code with Eclipse

First of all we have to follow three of my previous posts where we installed PHP, PEAR, CodeSniffer, CakePHP Sniff and Eclipse PHP Plugins.

Go to the preferences menu on Eclipse and navigate to...

PHP -> PHP Executables -> Add...

Once we have PHP configured on our Eclipse we have to setup PEAR go to...

PHP Tools -> Library -> PEAR -> New...

And select the path where php55 was installed using homebrew, you can run this command to know the path of php55

brew --prefix php55

Then just add at the end of that command

.../lib/PHP

And the last step is select our just configured PEAR path a the default library used by our PHP CodeSniffer, as you can see on the imagen below:

And done! just enjoy a code clean! :)