Skip to content

Commit 1f526d8

Browse files
committed
docs: add comments, typehinting
1 parent b2b7efc commit 1f526d8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

inc/formanswer.class.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ public function parseTags(string $content, PluginFormcreatorTargetInterface $tar
12731273
* @param array $input fields from the HTML form
12741274
* @return boolean true if answers are valid, false otherwise
12751275
*/
1276-
protected function validateFormAnswer($input) {
1276+
protected function validateFormAnswer($input): bool {
12771277
$this->getQuestionFields($input['plugin_formcreator_forms_id']);
12781278

12791279
// Parse form answers
@@ -1303,6 +1303,12 @@ protected function validateFormAnswer($input) {
13031303
return true;
13041304
}
13051305

1306+
/**
1307+
* Check the captcha is resolved by the user
1308+
*
1309+
* @param array $input
1310+
* @return boolean
1311+
*/
13061312
public function validateCaptcha(array $input): bool {
13071313
$form = $this->getForm($input['plugin_formcreator_forms_id']);
13081314
if ($this->isAnswersValid && $form->fields['access_rights'] == PluginFormcreatorForm::ACCESS_PUBLIC && $form->fields['is_captcha_enabled'] != '0') {

0 commit comments

Comments
 (0)