Skip to content

Commit 359da9c

Browse files
committed
refactor: [#162] rename initialize_dependencies to create_command_handler
- Rename initialize_dependencies() to create_command_handler() for clarity - Update progress message from 'Initializing dependencies' to 'Creating command handler' - Update method documentation and workflow steps documentation The new name better reflects what the method actually does - creating the application layer command handler rather than initializing dependencies.
1 parent bfded72 commit 359da9c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/presentation/controllers/destroy/handler.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl DestroyCommandController {
232232
///
233233
/// Orchestrates all steps of the destroy command:
234234
/// 1. Validate environment name
235-
/// 2. Initialize dependencies
235+
/// 2. Create command handler
236236
/// 3. Tear down infrastructure
237237
/// 4. Complete with success message
238238
///
@@ -258,7 +258,7 @@ impl DestroyCommandController {
258258
) -> Result<Environment<Destroyed>, DestroySubcommandError> {
259259
let env_name = self.validate_environment_name(environment_name)?;
260260

261-
let handler = self.initialize_dependencies()?;
261+
let handler = self.create_command_handler()?;
262262

263263
let destroyed = self.tear_down_infrastructure(&handler, &env_name)?;
264264

@@ -291,13 +291,13 @@ impl DestroyCommandController {
291291
Ok(env_name)
292292
}
293293

294-
/// Initialize application layer dependencies
294+
/// Create application layer command handler
295295
///
296296
/// Creates the application layer command handler with all required
297297
/// dependencies (repository, clock, etc.).
298298
#[allow(clippy::result_large_err)]
299-
fn initialize_dependencies(&mut self) -> Result<DestroyCommandHandler, DestroySubcommandError> {
300-
self.progress.start_step("Initializing dependencies")?;
299+
fn create_command_handler(&mut self) -> Result<DestroyCommandHandler, DestroySubcommandError> {
300+
self.progress.start_step("Creating command handler")?;
301301
let handler = DestroyCommandHandler::new(self.repository.clone(), self.clock.clone());
302302
self.progress.complete_step(None)?;
303303

0 commit comments

Comments
 (0)