-
Notifications
You must be signed in to change notification settings - Fork 0
Tasks signature #74
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
Tasks signature #74
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 refactors method signatures across the Upsun SDK test suite and core files to use named parameters instead of positional arguments. The main goals are to improve code readability, type safety, and maintainability by explicitly naming parameters when calling methods.
- Replace array-based parameter passing with named parameters in task method calls
- Add proper PHPDoc annotations with
@throwsdeclarations for exception handling - Remove variable definitions where parameters are now passed directly as named arguments
Reviewed Changes
Copilot reviewed 47 out of 49 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/UpsunConfigTest.php | Updates constructor calls and test methods to use named parameters |
| tests/UpsunClientTest.php | Adds exception documentation and uses named parameters |
| tests/Core/Tasks/WorkersTaskTest.php | Refactors worker task method calls to use named parameters |
| tests/Core/Tasks/VariablesTaskTest.php | Converts variable task operations from array-based to named parameter calls |
| tests/Core/Tasks/UsersTaskTest.php | Updates user management operations with named parameters and adds new test methods |
| tests/Core/Tasks/TeamsTaskTest.php | Refactors team operations to use named parameters and adds new test cases |
| tests/Core/Tasks/SupportTicketsTaskTest.php | Updates support ticket operations with named parameters |
| tests/Core/Tasks/SourceOperationsTaskTest.php | Converts source operation calls to named parameters |
| tests/Core/Tasks/RoutesTaskTest.php | Updates route management calls with named parameters |
| tests/Core/Tasks/ResourcesTaskTest.php | New test file for resource management operations |
| tests/Core/Tasks/RegionsTaskTest.php | Updates region operations with named parameters |
| tests/Core/Tasks/ProjectsTaskTest.php | Extensive refactoring of project operations to use named parameters |
| tests/Core/Tasks/OrganizationsTaskTest.php | Updates organization management with named parameters and improved test data |
| tests/Core/Tasks/OperationsTaskTest.php | Refactors operation execution calls to use named parameters |
| tests/Core/Tasks/InvitationsTaskTest.php | Updates invitation management with named parameters |
| tests/Core/Tasks/BaseTestCase.php | Minor documentation improvement |
| templates/php/README.mustache | Updates README examples to use named parameters |
| src/UpsunClient.php | Updates constructor calls to use named parameters |
Comments suppressed due to low confidence (2)
tests/Core/Tasks/OperationsTaskTest.php:1
- The test method
testRunThrowsApiExceptionshould throw anApiExceptionbut instead creates a result and asserts equality. The method name indicates it should test exception throwing, but the implementation doesn't match.
<?php
tests/Core/Tasks/ProjectsTaskTest.php:1
- Assertion compares
$projectsarray with itself. This should likely compare$projectswith$orgProjectList['items']to validate the actual vs expected data.
<?php
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 47 out of 49 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.