Code style - #109
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #109 +/- ##
============================================
- Coverage 98.73% 98.23% -0.50%
- Complexity 211 218 +7
============================================
Files 31 31
Lines 553 568 +15
============================================
+ Hits 546 558 +12
- Misses 7 10 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR applies automated code style improvements using Rector, focusing on modernizing string formatting and improving code consistency. The changes upgrade Rector's coding style and code quality levels from 0 to 10, and add tests directory to PHPStan analysis.
Key changes:
- Replaces string concatenation with
sprintf()for cleaner string formatting - Adopts Yoda conditions for null comparisons (
null !== $variable) - Simplifies code logic where possible (e.g., array iteration replaced with null coalescing)
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Functional/Model/Configuration/ImportConfigurationTest.php | Renames exception variable from $exception to $throwable for clarity |
| tests/Functional/AbstractWebTestCase.php | Adds explicit ?string type hint to $content parameter |
| tests/Fixtures/Hook/BypassFinalHook.php | Removes entire BypassFinalHook fixture file |
| src/Validator/Constraints/DatabaseEntityUniqueValidator.php | Converts string concatenation to sprintf() and adopts Yoda condition for null check |
| src/Validator/Constraints/AbstractValidator.php | Converts string interpolation to sprintf() for path construction |
| src/Twig/TemplateExtension.php | Converts string interpolation to sprintf() in exception message |
| src/Model/Matrix/MatrixFactory.php | Converts string interpolation to sprintf() in exception message |
| src/Model/Matrix/Matrix.php | Simplifies entity ID value lookup with null coalescing operator |
| src/Form/Type/MatrixRecordType.php | Changes string interpolation to explicit concatenation with dot operator |
| rector.php | Upgrades Rector's coding style and code quality levels to 10, skips NewlineAfterStatementRector |
| phpstan.neon | Adds tests directory to PHPStan analysis paths |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ad51959 to
0a660e3
Compare
481ceed to
2326c90
Compare
1f2cff7 to
a7cbdfa
Compare
7c7b340 to
99bfa12
Compare
99bfa12 to
b9d1fa0
Compare
No description provided.