Backport the NewAnonymousClassesSniff for older PHPCS versions. #325

Merged
merged 1 commit into from Jan 15, 2017

Projects

None yet

3 participants

@jrfnl
Contributor
jrfnl commented Jan 3, 2017

This seemed like a quick fix to make.

In PHPCS 2.3.4 - 2.5.2, this sniff would throw an error about the T_ANON_CLASS constant not being defined (as it wasn't fully implemented properly in PHPCS until PHPCS 2.6.0).
Pre-PHPCS 2.3.4, the sniff was disregarded and the test skipped.

Includes additional test against false positives (test case was already in place, just not tested).
Removes test exclusion for this sniff on PHPCS <2.3.4.

@jrfnl jrfnl Backport the NewAnonymousClassesSniff for older PHPCS versions.
This seemed like a quick fix to make.

In PHPCS 2.3.4 - 2.5.2, this sniff would throw an error about the `T_ANON_CLASS` constant not being defined (as it wasn't fully implemented properly in PHPCS until PHPCS 2.6.0).
Pre-PHPCS 2.3.4, the sniff was disregarded and the test skipped.

Includes additional test against false positives (test case was already in place, just not tested).
Removes test exclusion for this sniff on PHPCS <2.3.4.
1963355
@coveralls
coveralls commented Jan 3, 2017 edited

Coverage Status

Coverage increased (+0.06%) to 96.918% when pulling 1963355 on jrfnl:feature/anon-classes-backport into 4853c6d on wimg:master.

@coveralls

Coverage Status

Coverage increased (+0.06%) to 96.918% when pulling 1963355 on jrfnl:feature/anon-classes-backport into 4853c6d on wimg:master.

@coveralls

Coverage Status

Coverage increased (+0.06%) to 96.918% when pulling 1963355 on jrfnl:feature/anon-classes-backport into 4853c6d on wimg:master.

@coveralls

Coverage Status

Coverage increased (+0.06%) to 96.918% when pulling 1963355 on jrfnl:feature/anon-classes-backport into 4853c6d on wimg:master.

@coveralls

Coverage Status

Coverage increased (+0.06%) to 96.918% when pulling 1963355 on jrfnl:feature/anon-classes-backport into 4853c6d on wimg:master.

@coveralls

Coverage Status

Coverage increased (+0.06%) to 96.918% when pulling 1963355 on jrfnl:feature/anon-classes-backport into 4853c6d on wimg:master.

@wimg wimg merged commit bf5b0f7 into wimg:master Jan 15, 2017

2 checks passed

Scrutinizer No new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jrfnl jrfnl deleted the jrfnl:feature/anon-classes-backport branch Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment