Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use PHP_CodeSniffer with XAMPP?

I am running XAMPP with windows XP. I just download PHP_CodeSniffer and cannot figure out how to run it.

Thank you

like image 762
q0987 Avatar asked Aug 31 '10 18:08

q0987


1 Answers

The documentation has it all.

EDIT:

The first line of phpcs is:

#!@php_bin@

you need to replace @php_bin@ with correct path to php to make a meaningful shebang as(In linux):

#!/usr/bin/php

Since windows does not have the concept of shebang, you can delete the first line of phpcsand then run it as:

C:\>path\to\php\bin\php.exe path\to\phpcs path\to\file\to\analyze
like image 127
codaddict Avatar answered Sep 21 '22 19:09

codaddict