-
Notifications
You must be signed in to change notification settings - Fork 0
CyclomaticComplexityRule and General Updates #94
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds a new CyclomaticComplexityRule to detect methods with high cyclomatic complexity, updates composer dependencies, fixes README information, and refactors test files to follow PSR-4 standards by splitting multi-class fixture files into separate files with corrected namespaces.
- Adds comprehensive CyclomaticComplexityRule implementation with configurable thresholds and reporting options
- Updates all composer dependencies to latest versions
- Refactors test fixtures across multiple rules to follow PSR-4 (one class per file)
- Corrects test namespaces and updates test expectations after fixture reorganization
Reviewed changes
Copilot reviewed 74 out of 75 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Rules/CyclomaticComplexity/CyclomaticComplexityRule.php | New rule implementation calculating cyclomatic complexity for methods and classes |
| src/Rules/CyclomaticComplexity/Config.php | Configuration class for complexity thresholds and reporting options |
| config/extension.neon | Adds parameter schema and service registration for CyclomaticComplexity rule |
| docs/CyclomaticComplexity.md | Comprehensive documentation for the new rule with examples |
| tests/Rules/CyclomaticComplexity/* | Test suite with 4 test scenarios covering different configurations |
| tests/Rules/TooManyMethods/Fixture/* | Splits monolithic ExampleClass.php into separate PSR-4 compliant files |
| tests/Rules/ShortClassName/Fixture/* | Splits combined fixture files into individual class files |
| tests/Rules/LongClassName/Fixture/* | Splits interface/trait/enum into separate files |
| tests/Rules/ConstructorWithNameAsEnclosingClass/Fixture/* | Separates classes, traits, and interfaces into individual files |
| tests/Rules/ConstantNamingConventions/Fixture/* | Splits interface and enum into separate files |
| tests/Rules/BooleanArgumentFlag/Fixture/* | Reorganizes fixtures into separate files per class |
| tests/Rules/BooleanArgumentFlag/config/* | Updates ignored class namespaces to match corrected test namespaces |
| CLAUDE.md | Adds PSR-4 fixture file standards documentation |
| README.md | Adds CyclomaticComplexity to rules table, comments out contributing section |
| composer.json | Removes PHP_CS_FIXER_IGNORE_ENV export from cs-fix script |
| composer.lock | Updates all dependency versions to latest compatible releases |
Update composer deps, fix some README information, add CyclomaticComplexityRule closing #37, and fix a lot of test file namespaces