View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0021884 | mantisbt | code cleanup | public | 2016-11-08 05:55 | 2020-09-02 11:01 |
Reporter | dregad | Assigned To | cproensa | ||
Priority | low | Severity | tweak | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Target Version | 1.3.4 | Fixed in Version | 1.3.4 | ||
Summary | 0021884: Use meaningful names for bugnote cache global variables | ||||
Description | As discussed in https://github.com/mantisbt/mantisbt/pull/941#discussion_r86762747 dregad I never noticed we had 2 distinct variables for bugnotes caching. It is not really clear what the difference between them are, and they are not formally declared at the top of bugnote api, only as global in the functions using them. Do we actually need 2 of them ? Even though that's not directly related to this PR, I would suggest to declare them, and add a PHPDoc block to explain their purpose and differences. vboctor I would also rename them to more meaningful names. For example:
cproensa right, those names are self-explaining, way better than current ones. | ||||
Tags | No tags attached. | ||||
MantisBT: master-1.3.x ffe67c9e 2016-11-16 09:56 Committer: dregad Details Diff |
Bugnote api, use meaningful names and add types - Rename global variables in bugnote_api used to cache bugnote data, to a more defining name. - Declare, initialize and document the cache variables. - Add type hints to several function parameters Fixes: 0021884 |
Affected Issues 0021884 |
|
mod - core/bugnote_api.php | Diff File |