Refactor deleteEmpty namespace handling by NB-Core · Pull Request #33 · NB-Core/modules · GitHub
Skip to content

Refactor deleteEmpty namespace handling#33

Merged
NB-Core merged 2 commits into
tlwizardfrom
codex/add-methods-to-handle-empty-namespaces
Jul 14, 2025
Merged

Refactor deleteEmpty namespace handling#33
NB-Core merged 2 commits into
tlwizardfrom
codex/add-methods-to-handle-empty-namespaces

Conversation

@NB-Core

@NB-Core NB-Core commented Jul 14, 2025

Copy link
Copy Markdown
Owner

Summary

  • add helper methods getEmptyNamespaceRows() and deleteEmptyNamespaceRows() in WizardService
  • reuse these helpers inside deleteEmpty() instead of duplicating SQL

Testing

  • php -l systems/translationwizard/translationwizard/WizardService.php

https://chatgpt.com/codex/tasks/task_e_6874ba48e3dc8329878f08ac57d5faa9

@NB-Core NB-Core requested a review from Copilot July 14, 2025 08:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 handling of empty-namespace deletions in WizardService by introducing helper methods to avoid duplicated SQL and updating the existing deleteEmpty() method to use them.

  • Added private helpers getEmptyNamespaceRows() and deleteEmptyNamespaceRows()
  • Updated deleteEmpty() to replace inline SQL with the new helper calls
Comments suppressed due to low confidence (1)

systems/translationwizard/translationwizard/WizardService.php:213

  • Consider adding unit or integration tests for getEmptyNamespaceRows() and deleteEmptyNamespaceRows() to verify they correctly retrieve and delete rows without a namespace as intended.
    private static function getEmptyNamespaceRows() {

Comment thread systems/translationwizard/translationwizard/WizardService.php Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@NB-Core NB-Core merged commit 721bf8f into tlwizard Jul 14, 2025
@NB-Core NB-Core deleted the codex/add-methods-to-handle-empty-namespaces branch July 14, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants