Merge pull request #5 from timhunt/master

Don't check XML files
NOBUG: Add some well-known globals to avoid reporting them.
Bump to 2012061600 (v2.2.2)

Changes:
- add some well known globals to avoid reporting them.
- don't check .xml files (Tim Hunt).
CONTRIB-4145 Update to PHP CodeSniffer 1.4.4
CONTRIB-4145 Switch to new way to specify ignores.

For PHP CodeSniffer 1.4.x and upwards, they way to
specify ignores has changed. It used to be an array
of paths as values. And now it's an array of paths
as keys, with values being "absolute" or "relative".

This commit mimics the conversion performed by the CLI.php,
converting all the to absolute. And seems to work.
CONTRIB-4144 Add CHANGES.txt, for better tracking of modifications.
CONTRIB-4149 Add PHPCompatibility standard.

This is finally being copied there, losing
connection with origin: git://github.com/wimg/PHPCompatibility.git

So, from time to time, we'll need to look for
changes there. If we are doing that for the whole
CodeSniffer, no reason for doing the same for this.
CONTRIB-4149 Add the phpcompatibility sniffs to moodle std.

Note this leads to some errors / warnings duplicated because
we have already the DeprecatedFunctionsSniff working, but it's
dependent of the PHP version being used, while the phpcompatibility
sniffs aren't. And better get some twice than miss them.
CONTRIB-4149 Update CHANGES.php with phpcompatibility info.
CONTRIB-4149 Improve define/defined handling

This avoids zillions of unnecesary findNext() calls, that
for big files have a very negative impact. Instead, let's
handle it progresively (current token).
CONTRIB-4151 Make standards/sniffs easily testable.
CONTRIB-4144 Bump to 2013021400 (v2.2.5)

Changes:
- CONTRIB-4151: added moodle phpunit support (via local_codechecker_testcase).
- CONTRIB-4149: added phpcompatibility sniffs (git://github.com/wimg/PHPCompatibility.git).
- CONTRIB-4145: upgrade to PHPCS 1.4.4.
- CONTRIB-4144: add (this) CHANGES.txt file.
CONTRIB-4160 Verify that there aren't unexpected* results.

*unexpected = not defined by (error|warning) declared expectations.
CONTRIB-4150 Allow phpdocs before define()
CONTRIB-4186 CSS Cleanup

This encloses the whole report into a new
.local_codechecker_results div and applies
such class to all the styles to avoid problems
(.region-content) with other parts of Moodle.

Some unused styles are also deleted and a bit of
extra space is added beween each reported problem
for better readability.
CONTRIB-4186 Calculations to lib, pass them to renderer.

This moves the calculation of totals to locallib,
for later improvements in the way they are shown
by the renderer by diferentiating error/warnings/good.
CONTRIB-3582 Allow to specify exluded paths.
CONTRIB-3562 Fix the tests after adding MOODLE_INTERNAL extra line.
CONTRIB-3562 Allow some tokens to be ignored for indenting.

Note this has lead to a near complete duplicate of the
parent class process() method. To avoid that and allow
easier subclassing, one pull request has been performed
upstream:

https://github.com/squizlabs/PHP_CodeSniffer/pull/96

If it gets accepted, then our Sniff will be trivial.
CONTRIB-3562 Moving back to (dflt) non-exact mode.

The ScopeIndent sniff, when running under exact mode
leads to lots of false positives in multiline expressions
under a scope (if, while, switch...). So we need to move
back to previous situation, when only "missing" indentations
are detected.