-
-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify extended classes. #647
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensure that any sniff with a dependency on an external sniff has a consistent `class_exists()` check and throws an appropriate error message.
jrfnl
changed the title
Consistent class exists check for extended classes.
Verify extended classes.
Jul 29, 2016
jrfnl
force-pushed
the
WPCS/feature/consistent-class-exists
branch
from
July 29, 2016 05:55
10f66dc
to
aa33ea7
Compare
Verified that classes which extend a parent actually *use* that parent and if not, removed the `extend`. If they use the parent, leverage the properties available in the parent and remove duplicate function calls.
jrfnl
force-pushed
the
WPCS/feature/consistent-class-exists
branch
from
July 29, 2016 05:58
aa33ea7
to
8760c44
Compare
jrfnl
added a commit
that referenced
this pull request
Aug 1, 2016
jrfnl
added a commit
that referenced
this pull request
Aug 1, 2016
jrfnl
added a commit
that referenced
this pull request
Aug 4, 2016
westonruter
pushed a commit
that referenced
this pull request
Aug 18, 2016
* Update the file and class @Package tag and remove the @category tag. Follow the standard as described in https://www.phpdoc.org/docs/latest/references/phpdoc/tags/package.html The @category tag is considered deprecated. A hierarchical @Package tag should be used instead. Ref: https://www.phpdoc.org/docs/latest/references/phpdoc/tags/category.html * Use correct version number for the newly deprecated classes. * Fix some - unintentional - parse errors in the test files. * Attempt to lead by example comment-wise in the unit tests. Capitalization, punctuation and some spelling. * Proper capitalization and punctuation for class end comments. * Remove `//end` comments for methods and conditionals < 35 lines. * Simplify the test file method doc blocks. * Various documentation fixes, largely based on PHPCS Docs output. * Make sure any function which will be passed the $phpcsFile has the right type hint. But only if it doesn't conflict with upstream function signatures. * Verify and update the docblocks for all files and classes. Based on Git file history: * Add @SInCE tags to all classes. * Add @SInCE tags to properties and methods if they weren't included from the start. * Verify/Fix a number of @author tags. * Remove old/copied over/incorrect PHPCS tags. * Where necessary improved/corrected the class description. Also: * Consistent tag order in class doc blocks. * Fix tag alignment. * Remove redundant explanation in unit test class doc blocks. * Sync the description line of the unit test class doc blocks. * Add handbook links to a number of sniffs. * Add reference to upstream sniff a sniff is based upon. Includes information on when the sniff was last synced with the upstream sniff if applicable and available. * Add @license tag and @link tag to the WPCS GH repo, to all file level doc blocks. License tag as per https://www.phpdoc.org/docs/latest/references/phpdoc/tags/license.html * Add the docs ruleset to the coding standard for WPCS itself. * Add @SInCE class changelogs for PR #647. * Fix minor grammar error. * Updated `@since` tags for `2014-12-11` release to `0.3.0`. * Re-instate previously removed @SInCE tags. * Updated based on feedback. * Adjusted the @Package tags as per discussion in the PR thread * Removed the @link tag to the handbook at the file level doc block * Removed the @author tags
grappler
referenced
this pull request
in WPTT/WPThemeReview
Sep 25, 2016
* Update the file and class @Package tag and remove the @category tag. Follow the standard as described in https://www.phpdoc.org/docs/latest/references/phpdoc/tags/package.html The @category tag is considered deprecated. A hierarchical @Package tag should be used instead. Ref: https://www.phpdoc.org/docs/latest/references/phpdoc/tags/category.html * Use correct version number for the newly deprecated classes. * Fix some - unintentional - parse errors in the test files. * Attempt to lead by example comment-wise in the unit tests. Capitalization, punctuation and some spelling. * Proper capitalization and punctuation for class end comments. * Remove `//end` comments for methods and conditionals < 35 lines. * Simplify the test file method doc blocks. * Various documentation fixes, largely based on PHPCS Docs output. * Make sure any function which will be passed the $phpcsFile has the right type hint. But only if it doesn't conflict with upstream function signatures. * Verify and update the docblocks for all files and classes. Based on Git file history: * Add @SInCE tags to all classes. * Add @SInCE tags to properties and methods if they weren't included from the start. * Verify/Fix a number of @author tags. * Remove old/copied over/incorrect PHPCS tags. * Where necessary improved/corrected the class description. Also: * Consistent tag order in class doc blocks. * Fix tag alignment. * Remove redundant explanation in unit test class doc blocks. * Sync the description line of the unit test class doc blocks. * Add handbook links to a number of sniffs. * Add reference to upstream sniff a sniff is based upon. Includes information on when the sniff was last synced with the upstream sniff if applicable and available. * Add @license tag and @link tag to the WPCS GH repo, to all file level doc blocks. License tag as per https://www.phpdoc.org/docs/latest/references/phpdoc/tags/license.html * Add the docs ruleset to the coding standard for WPCS itself. * Add @SInCE class changelogs for PR #647. * Fix minor grammar error. * Updated `@since` tags for `2014-12-11` release to `0.3.0`. * Re-instate previously removed @SInCE tags. * Updated based on feedback. * Adjusted the @Package tags as per discussion in the PR thread * Removed the @link tag to the handbook at the file level doc block * Removed the @author tags
JDGrimes
pushed a commit
that referenced
this pull request
Oct 8, 2016
* Update the file and class @Package tag and remove the @category tag. Follow the standard as described in https://www.phpdoc.org/docs/latest/references/phpdoc/tags/package.html The @category tag is considered deprecated. A hierarchical @Package tag should be used instead. Ref: https://www.phpdoc.org/docs/latest/references/phpdoc/tags/category.html * Use correct version number for the newly deprecated classes. * Fix some - unintentional - parse errors in the test files. * Attempt to lead by example comment-wise in the unit tests. Capitalization, punctuation and some spelling. * Proper capitalization and punctuation for class end comments. * Remove `//end` comments for methods and conditionals < 35 lines. * Simplify the test file method doc blocks. * Various documentation fixes, largely based on PHPCS Docs output. * Make sure any function which will be passed the $phpcsFile has the right type hint. But only if it doesn't conflict with upstream function signatures. * Verify and update the docblocks for all files and classes. Based on Git file history: * Add @SInCE tags to all classes. * Add @SInCE tags to properties and methods if they weren't included from the start. * Verify/Fix a number of @author tags. * Remove old/copied over/incorrect PHPCS tags. * Where necessary improved/corrected the class description. Also: * Consistent tag order in class doc blocks. * Fix tag alignment. * Remove redundant explanation in unit test class doc blocks. * Sync the description line of the unit test class doc blocks. * Add handbook links to a number of sniffs. * Add reference to upstream sniff a sniff is based upon. Includes information on when the sniff was last synced with the upstream sniff if applicable and available. * Add @license tag and @link tag to the WPCS GH repo, to all file level doc blocks. License tag as per https://www.phpdoc.org/docs/latest/references/phpdoc/tags/license.html * Add the docs ruleset to the coding standard for WPCS itself. * Add @SInCE class changelogs for PR #647. * Fix minor grammar error. * Updated `@since` tags for `2014-12-11` release to `0.3.0`. * Re-instate previously removed @SInCE tags. * Updated based on feedback. * Adjusted the @Package tags as per discussion in the PR thread * Removed the @link tag to the handbook at the file level doc block * Removed the @author tags
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ensured that any sniff with a dependency on an external sniff has a consistent
class_exists()
check and throws an appropriate error message.Verified that classes which extend a parent actually use that parent and if not, removed the
extend
.If they use the parent, leverage the properties available in the parent and remove duplicate function calls.