Skip to content

Code style - #109

Merged
jgrygierek merged 2 commits into
masterfrom
refactor/code-style
Dec 21, 2025
Merged

Code style#109
jgrygierek merged 2 commits into
masterfrom
refactor/code-style

Conversation

@jgrygierek

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 12, 2025 22:02
@codecov

codecov Bot commented Dec 12, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.23%. Comparing base (d8e6d1c) to head (b9d1fa0).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...odel/Configuration/AbstractImportConfiguration.php 90.00% 1 Missing ⚠️
src/Model/FileImport.php 50.00% 1 Missing ⚠️
src/Service/CsvDelimiterDetector.php 75.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/Functional/Model/Configuration/ImportConfigurationTest.php Outdated
Comment thread src/Validator/Constraints/DatabaseEntityUniqueValidator.php
@jgrygierek
jgrygierek force-pushed the refactor/code-style branch 15 times, most recently from ad51959 to 0a660e3 Compare December 13, 2025 21:30
@jgrygierek
jgrygierek force-pushed the refactor/code-style branch 6 times, most recently from 481ceed to 2326c90 Compare December 13, 2025 23:06
@jgrygierek
jgrygierek force-pushed the refactor/code-style branch 4 times, most recently from 1f2cff7 to a7cbdfa Compare December 21, 2025 21:25
@jgrygierek
jgrygierek force-pushed the refactor/code-style branch 9 times, most recently from 7c7b340 to 99bfa12 Compare December 21, 2025 22:30
@jgrygierek
jgrygierek merged commit b3551dc into master Dec 21, 2025
11 of 13 checks passed
@jgrygierek
jgrygierek deleted the refactor/code-style branch December 21, 2025 22:37
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.

2 participants