Add PHPCS coding standards and fix violations#276
Open
pfefferle wants to merge 1 commit intomicroformats:mainfrom
Open
Add PHPCS coding standards and fix violations#276pfefferle wants to merge 1 commit intomicroformats:mainfrom
pfefferle wants to merge 1 commit intomicroformats:mainfrom
Conversation
- Add PHPCS configuration for code style enforcement - Rename parse_recursive() to parseRecursive() with deprecated wrapper for backwards compatibility - Rename test_vevent() to testVevent() for PSR-1 compliance - Add phpcs:ignore comments for set_up() methods (PHPUnit polyfill compatibility) - Exclude ParseDTTest.php from camelCase rule to preserve date format method names - Fix whitespace and indentation issues in test files
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
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.
I tried to create some basic PHPCS rules that matches the current code. The idea of this PR is to work towards a PSR2 or PSR12 compatible code base for the next minor or major release.
Summary
parse_recursive()toparseRecursive()with deprecated wrapper for backwards compatibilitytest_vevent()totestVevent()for PSR-1 compliancephpcs:ignorecomments forset_up()methods (PHPUnit polyfill compatibility)ParseDTTest.phpfrom camelCase rule to preserve date format method names (e.g.,testYYYY_MM_DD__HH_MM)Test plan
./vendor/bin/phpcsto verify no violations./vendor/bin/phpunit teststo verify tests still passparse_recursive()still works for backwards compatibility