-
Notifications
You must be signed in to change notification settings - Fork 44
chore: PHPCS coding standards fixes #194
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
Merged
Merged
Conversation
This file contains hidden or 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
Apply PHPCBF (PHP Code Beautifier and Fixer) to automatically resolve 1694 coding standards violations across 17 files. The remaining ~1000 violations require manual attention. Fixes include spacing, array formatting, comment formatting, brace positioning, and modernising dirname(__FILE__) to __DIR__. All unit tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WordPress coding standards require all inline comments to end with full stops, exclamation marks, or question marks. This change updates inline comments across the codebase to comply with the Squiz.Commenting.InlineComment.InvalidEndChar PHPCS rule, improving code consistency and maintainability.
Add missing function docblocks to satisfy the Squiz.Commenting.FunctionComment.Missing PHPCS rule. This is the first batch addressing 55 of 133 missing docblocks across 6 files: - class-syndication-admin-notices.php (3 docblocks) - class-syndication-logger.php (1 docblock) - class-wp-cli.php (7 docblocks) - class-syndication-logger-viewer.php (17 docblocks) - class-syndication-wp-rest-client.php (11 docblocks) - class-syndication-wp-rss-client.php (16 docblocks) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add missing function docblocks to the Syndication_Client_Factory class to satisfy the Squiz.Commenting.FunctionComment.Missing PHPCS rule. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Converts 19 standard comparisons to Yoda condition format across four files to comply with WordPress PHP Coding Standards. Yoda conditions place the constant or literal value on the left side of the comparison, which prevents accidental variable assignment when a single equals sign is mistakenly used instead of a comparison operator.
Replaced @inheritdoc tags with complete docblocks in encryption classes and corrected malformed @param tags throughout the codebase. The changes ensure each parameter has proper type hints and descriptions, resolving 106 PHPCS violations related to missing or improperly formatted parameter documentation. This improves IDE support and makes the codebase more maintainable by providing clear documentation for method signatures across encryption, event handling, syndication, and CLI components. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolves multiple PHPCS violations related to documentation formatting. Adds missing full stops to parameter descriptions, capitalises the first letter of docblock descriptions where required, and removes extraneous blank lines after class docblocks to align with WordPress coding standards. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolves remaining PHPCS violations across core syndication classes by adding missing method visibility keywords and converting single-line comments to proper docblock format. Ensures all public API methods and overridden methods are explicitly marked, whilst helper methods receive appropriate private visibility. Also removes extraneous blank lines before closing braces in HTML output contexts. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds phpcs:ignore comments for empty if/elseif blocks that are intentional placeholders for future functionality (TODOs for extra data sanitization, term object type support, and attachment update failure handling). Also fixes a Yoda condition and corrects a typo in a comment. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds comprehensive file-level and class-level documentation across the plugin to satisfy WordPress coding standards requirements. Every PHP file now includes a @Package tag in its file header, and all classes have descriptive docblocks explaining their purpose and responsibility within the syndication system. Also updates .distignore and .gitattributes to exclude the .claude/ directory from distribution packages and exports. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
Comprehensive PHPCS coding standards fixes across the syndication plugin codebase. This PR addresses multiple categories of violations to improve code quality and maintainability.
Changes included:
phpcbffor auto-fixable issues (spacing, alignment)@paramand@returndocumentation'value' === $var)public/privatekeywords to all methods@package Syndicationheaders and class descriptionsphpcs:ignorefor intentional placeholder blocksNot addressed (deferred to 3.0.0):
require_once(will be resolved with namespace refactor)Test plan
composer csto verify no regressions🤖 Generated with Claude Code