Changeset View
Changeset View
Standalone View
Standalone View
core/units/helpers/form_submission_helper.php
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Line(s) | |||||
* | * | ||||
* @param $form_submission kDBItem | * @param $form_submission kDBItem | ||||
* @return kDBItem | * @return kDBItem | ||||
*/ | */ | ||||
function &getForm(&$form_submission) | function &getForm(&$form_submission) | ||||
{ | { | ||||
$form_id = $form_submission->GetDBField('FormId'); | $form_id = $form_submission->GetDBField('FormId'); | ||||
/** @var kDBItem $form */ | |||||
$form = $this->Application->recallObject('form', null, Array ('skip_autoload' => true)); | $form = $this->Application->recallObject('form', null, Array ('skip_autoload' => true)); | ||||
Lint: Generic.PHP.LowerCaseKeyword.Found: PHP keywords must be lowercase; expected "array" but found "Array" | |||||
There must be no space between the Array keyword and the opening parenthesis Lint: CodingStandard.Array.Array.SpaceAfterKeyword: There must be no space between the Array keyword and the opening parenthesis | |||||
/* @var $form kDBItem */ | |||||
if ( !$form->isLoaded() || ($form->GetID() != $form_id) ) { | if ( !$form->isLoaded() || ($form->GetID() != $form_id) ) { | ||||
$form->Load($form_id); | $form->Load($form_id); | ||||
} | } | ||||
return $form; | return $form; | ||||
} | } | ||||
/** | /** | ||||
* Returns form submission based on given submission log | * Returns form submission based on given submission log | ||||
* | * | ||||
* @param kDBItem $submission_log | * @param kDBItem $submission_log | ||||
* @return kDBItem | * @return kDBItem | ||||
* @access public | * @access public | ||||
*/ | */ | ||||
public function getSubmissionFromLog($submission_log) | public function getSubmissionFromLog($submission_log) | ||||
{ | { | ||||
$submission_id = $submission_log->GetDBField('FormSubmissionId'); | $submission_id = $submission_log->GetDBField('FormSubmissionId'); | ||||
/** @var kDBItem $form_submission */ | |||||
$form_submission = $this->Application->recallObject('formsubs.-item', null, Array ('skip_autoload' => true)); | $form_submission = $this->Application->recallObject('formsubs.-item', null, Array ('skip_autoload' => true)); | ||||
Line exceeds 120 characters; contains 121 characters Lint: Generic.Files.LineLength.TooLong: Line exceeds 120 characters; contains 121 characters | |||||
There must be no space between the Array keyword and the opening parenthesis Lint: CodingStandard.Array.Array.SpaceAfterKeyword: There must be no space between the Array keyword and the opening parenthesis | |||||
PHP keywords must be lowercase; expected "array" but found "Array" Lint: Generic.PHP.LowerCaseKeyword.Found: PHP keywords must be lowercase; expected "array" but found "Array" | |||||
/* @var $form_submission kDBItem */ | |||||
if ( $form_submission->isLoaded() && ($form_submission->GetID() == $submission_id) ) { | if ( $form_submission->isLoaded() && ($form_submission->GetID() == $submission_id) ) { | ||||
return $form_submission; | return $form_submission; | ||||
} | } | ||||
$form_submission->Load($submission_id); | $form_submission->Load($submission_id); | ||||
return $form_submission; | return $form_submission; | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |
PHP keywords must be lowercase; expected "array" but found "Array"