Skip to content

Conversation

@pfefferle
Copy link

@pfefferle pfefferle commented Dec 15, 2025

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

  • 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 (e.g., testYYYY_MM_DD__HH_MM)
  • Fix whitespace and indentation issues in test files

Test plan

  • Run ./vendor/bin/phpcs to verify no violations
  • Run ./vendor/bin/phpunit tests to verify tests still pass
  • Verify parse_recursive() still works for backwards compatibility

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant