-
Notifications
You must be signed in to change notification settings - Fork 0
[55] fix admin name question option #75
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
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 19160147855Details
💛 - Coveralls |
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 PR refactors the createAdminUser method to improve code clarity and consistency by extracting the service admin check into a dedicated boolean variable. The logic remains functionally equivalent but becomes more readable and maintainable.
Key Changes:
- Introduced
$isServiceAdminboolean variable to consolidate the service admin check - Updated all conditional expressions to use the new variable instead of redundant checks
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DenTray
left a comment
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.
@neellii please try to cover changed logic by autotests
src/Commands/InitCommand.php
Outdated
|
|
||
| if ($this->authType === AuthTypeEnum::None) { | ||
| $adminCredentials['name'] = $this->ask("Please enter admin name{$serviceLabel}", "{$serviceName} Admin"); | ||
| $adminCredentials['name'] = $this->ask("Please enter admin name{$serviceLabel}", when($isServiceAdmin, "{$serviceName} Admin", 'Admin')); |
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.
let's move default name generation to the separate variable
refs: #55