View Issue Details

IDProjectCategoryView StatusLast Update
0033774mantisbtcode cleanuppublic2024-02-18 17:28
Reporterdregad Assigned Todregad  
PrioritynormalSeveritytweakReproducibilityN/A
Status resolvedResolutionfixed 
Target Version2.27.0Fixed in Version2.27.0 
Summary0033774: Refactor mc_project_api.php
Description

While troubleshooting PHPUnit test failures with Project API, I noticed there was quite a bit of duplicated code in mc_project_api.php, as well as many static analysis warnings flagged by PHPStorm.

This is to track the refactoring to fix these issues.

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master 7abd1309

2024-02-18 17:24

dregad


Details Diff
Refactor mc_project_api.php

- Improve PHPDoc
- Fix static analysis warnings
- Introduce new functions to avoid code duplication
- mci_project_get_row()
- mci_project_get_versions()
- mci_project_initial_checks()

Fixes 0033774, PR https://github.com/mantisbt/mantisbt/pull/1970
Affected Issues
0033774
mod - api/soap/mc_api.php Diff File
mod - api/soap/mc_project_api.php Diff File