squizlabs/PHP_CodeSniffer — pull request #82 by robocoder (2012-12-13 20:50:23+00:00)
Title: include project's autoload.php if found

should work if phpcs is in PROJECT_DIR/bin/phpcs, PROJECT_DIR/vendor/bin/phpcs (where it is a symlink) or PROJECT_DIR/vendor/squizlabs/php_codesniffer

(lifted this one-liner from Doctrine)