feat: added User Report Settings Templates support#265
Merged
andrii-bodnar merged 2 commits intomasterfrom Mar 26, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #265 +/- ##
============================================
+ Coverage 92.75% 93.06% +0.31%
- Complexity 1722 1787 +65
============================================
Files 163 169 +6
Lines 4644 4850 +206
============================================
+ Hits 4307 4513 +206
Misses 337 337 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cc602d3 to
03cc944
Compare
03cc944 to
2771256
Compare
There was a problem hiding this comment.
Pull request overview
Adds support for User Report Settings Templates to the Crowdin API PHP client, including new models for user-scoped templates and hourly-based rate configurations, plus corresponding API methods and tests.
Changes:
- Introduce
UserReportSettingsTemplatemodel andUserApimethods to list/create/get/update/delete user report settings templates. - Add hourly-specific config models (
HourlyReportSettingsTemplateConfig,HourlyBaseRates,HourlyIndividualRates) and enablehoursas a supported report unit. - Extend
ReportSettingsTemplateConfigwith additional boolean configuration flags and update test coverage accordingly.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/CrowdinApiClient/Model/UserReportSettingsTemplateTest.php | New tests covering user template model hydration, setters, validation, and toArray(). |
| tests/CrowdinApiClient/Model/ReportSettingsTemplateTest.php | Updates fixture/config expectations and inlines assertions for loading. |
| tests/CrowdinApiClient/Model/ReportSettingsTemplateConfigTest.php | Adds coverage for new boolean config flags and updates setter/load assertions. |
| tests/CrowdinApiClient/Model/HourlyReportSettingsTemplateConfigTest.php | New tests for hourly config model (load/set/exception/toArray). |
| tests/CrowdinApiClient/Model/HourlyIndividualRatesTest.php | New tests for hourly individual rates model behavior and validation. |
| tests/CrowdinApiClient/Model/HourlyBaseRatesTest.php | New tests for hourly base rates model behavior and toArray(). |
| tests/CrowdinApiClient/Api/UserApiTest.php | Adds API tests for the new user report settings templates endpoints. |
| src/CrowdinApiClient/Model/UserReportSettingsTemplate.php | New model representing a user report settings template with unit-dependent config. |
| src/CrowdinApiClient/Model/ReportSettingsTemplateConfig.php | Adds new boolean config fields with getters/setters and includes them in toArray(). |
| src/CrowdinApiClient/Model/Report.php | Adds UNIT_HOURS and includes it in supported units. |
| src/CrowdinApiClient/Model/IndividualRates.php | Docblock tightening (string[]) for setLanguageIds() parameter. |
| src/CrowdinApiClient/Model/HourlyReportSettingsTemplateConfig.php | New hourly settings template config model (base + individual rates). |
| src/CrowdinApiClient/Model/HourlyIndividualRates.php | New hourly individual rates model with validation and serialization. |
| src/CrowdinApiClient/Model/HourlyBaseRates.php | New hourly base rates model with serialization. |
| src/CrowdinApiClient/Api/UserApi.php | Adds user report settings templates CRUD methods. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/CrowdinApiClient/Model/HourlyReportSettingsTemplateConfig.php
Outdated
Show resolved
Hide resolved
tests/CrowdinApiClient/Model/HourlyReportSettingsTemplateConfigTest.php
Outdated
Show resolved
Hide resolved
75de829 to
036fb92
Compare
andrii-bodnar
approved these changes
Mar 26, 2026
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.
No description provided.