squizlabs/PHP_CodeSniffer — pull request #117 by jfsimon (2013-05-06 14:05:48+00:00)
Title: Made lib compatible with PHAR applications

Code Sniffer is not compatible with PHAR applications because of its intensive use of `realpath` function. This PR solves this problem by removing all acurrences of `realpath` usage. I checked each one, and each one can be safely removed (or replaced by something else) because many PHP functions accept relative path (or path containing `/../` segments) as argument.

In the actual case, only following functions use the "newly un-realpathed" paths:
* is_dir
* is_file
* file_exists
* simplexml_load_file
* basename
* dirname
* fopen

Unit tests are okay. Note that I didn't move `realpath` usages from test as tests are not launched in the PHAR archives.