[options] Options: --confirm Execute the deactivation handler --dry-run Validate the handler without executing The module does not need to be in the enabled list. USAGE; } public function execute(array $args, array $options): int { $moduleId = $args[0] ?? ''; if ($moduleId === '') { fwrite(STDERR, $this->usage() . "\n"); return 1; } $result = $this->moduleRunner()->deactivate( $moduleId, (bool) ($options['confirm'] ?? false), (bool) ($options['dry-run'] ?? false) ); $stream = $result['exit_code'] === 0 ? STDOUT : STDERR; fwrite($stream, $result['message'] . PHP_EOL); return (int) $result['exit_code']; } }