rename "state" to "status" in response array
This commit is contained in:
parent
953adaf319
commit
a9d9dd5ace
2 changed files with 9 additions and 9 deletions
|
@ -145,7 +145,7 @@ class TwingleApiCall {
|
||||||
// If the CiviCRM TwingleProject campaign was changed, update the project
|
// If the CiviCRM TwingleProject campaign was changed, update the project
|
||||||
// on Twingle's side
|
// on Twingle's side
|
||||||
elseif (
|
elseif (
|
||||||
$result['state'] == 'TwingleProject exists' &&
|
$result['status'] == 'TwingleProject exists' &&
|
||||||
$values['last_update'] < $project->lastUpdate()
|
$values['last_update'] < $project->lastUpdate()
|
||||||
) {
|
) {
|
||||||
// If this is a test do not make database changes
|
// If this is a test do not make database changes
|
||||||
|
@ -158,7 +158,7 @@ class TwingleApiCall {
|
||||||
$result = $this->updateProject($project);
|
$result = $this->updateProject($project);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($result['state'] == 'TwingleProject exists') {
|
elseif ($result['status'] == 'TwingleProject exists') {
|
||||||
$result = $project->getResponse('TwingleProject up to date');
|
$result = $project->getResponse('TwingleProject up to date');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ class TwingleProject {
|
||||||
* If true: don't do any changes
|
* If true: don't do any changes
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* Returns a response array that contains title, id, project_id and state
|
* Returns a response array that contains title, id, project_id and status
|
||||||
*
|
*
|
||||||
* @throws \CiviCRM_API3_Exception
|
* @throws \CiviCRM_API3_Exception
|
||||||
*/
|
*/
|
||||||
|
@ -518,20 +518,20 @@ class TwingleProject {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a response that describes the state of a TwingleProject
|
* Get a response that describes the status of a TwingleProject
|
||||||
*
|
*
|
||||||
* @param string $state
|
* @param string $status
|
||||||
* State of the TwingleProject you want the response for
|
* status of the TwingleProject you want the response for
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* Returns a response array that contains title, id, project_id and state
|
* Returns a response array that contains title, id, project_id and status
|
||||||
*/
|
*/
|
||||||
public function getResponse(string $state) {
|
public function getResponse(string $status) {
|
||||||
return [
|
return [
|
||||||
'title' => $this->values['title'],
|
'title' => $this->values['title'],
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'project_id' => $this->values['id'],
|
'project_id' => $this->values['id'],
|
||||||
'state' => $state,
|
'status' => $status,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue