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

Cody tidy in CRM_Core_State #22841

Merged
merged 1 commit into from
Feb 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 2 additions & 23 deletions CRM/Core/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,10 @@ public function __construct($name, $type, $back, $next, &$stateMachine) {
$this->_stateMachine = &$stateMachine;
}

public function debugPrint() {
CRM_Core_Error::debug("{$this->_name}, {$this->_type}", "{$this->_back}, {$this->_next}");
}

/**
* Given an CRM Form, jump to the previous page.
*
* @param CRM_Core_Page $page
* @param CRM_Core_Form $page
*
* @return mixed
* does a jump to the back state
Expand All @@ -108,7 +104,7 @@ public function handleBackState(&$page) {
/**
* Given an CRM Form, jump to the next page.
*
* @param CRM_Core_Page $page
* @param CRM_Core_Form $page
*
* @return mixed
* Does a jump to the nextstate
Expand All @@ -123,23 +119,6 @@ public function handleNextState(&$page) {
}
}

/**
* Determine the name of the next state.
*
* This is useful when we want to display the navigation labels or potential path.
*
* @return string
*/
public function getNextState() {
if ($this->_type & self::FINISH) {
return NULL;
}
else {
$next = &$page->controller->getPage($this->_next);
return $next;
}
}

/**
* Mark this page as valid for the QFC framework.
*
Expand Down