Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM_Core_Component - Remove unused code #21086

Merged
merged 1 commit into from
Aug 11, 2021

Conversation

colemanw
Copy link
Member

Overview

Removes unused or redundant code.

Before

Unused functions which reference non-existent variables or constants.

After

Gone.

Technical Details

getMenuObject() references non-existent COMPONENT_MENU_CLASS, and is only ever called by &menu(), which is unused (if it were ever used it would crash because it references non-existent variable $task).

@civibot
Copy link

civibot bot commented Aug 11, 2021

(Standard links)

@civibot civibot bot added the master label Aug 11, 2021
/**
* @return array
*/
public static function &menu() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grepped around on 'menu'", "menu", menu(, :menu, >menu. Couldn't find anything relevant callers. Looks good.

Also, did a little bit r-run by enabling/disabling components and observing how the menu items were enabled/disabled. Seemed fine.

@totten totten merged commit d4da6b9 into civicrm:master Aug 11, 2021
@colemanw colemanw deleted the removeUnusedCode branch September 27, 2021 04:08
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