Loading src/HoneypotService.php +4 −4 Original line number Diff line number Diff line Loading @@ -293,7 +293,7 @@ class HoneypotService implements HoneypotServiceInterface { * @param array $complete_form * The complete form structure. */ public function validateHoneypot(array &$element, FormStateInterface $form_state, array &$complete_form) { public function validateHoneypot(array &$element, FormStateInterface $form_state, array &$complete_form): void { // Get the honeypot field value. $honeypot_value = $element['#value']; Loading @@ -315,7 +315,7 @@ class HoneypotService implements HoneypotServiceInterface { * @param array $complete_form * The complete form structure. */ public function validateTimeRestriction(array &$element, FormStateInterface $form_state, array &$complete_form) { public function validateTimeRestriction(array &$element, FormStateInterface $form_state, array &$complete_form): void { if ($form_state->isProgrammed()) { // Don't do anything if the form was submitted programmatically. return; Loading Loading @@ -354,7 +354,7 @@ class HoneypotService implements HoneypotServiceInterface { * - honeypot: If honeypot field was filled in. * - honeypot_time: If form was completed before the configured time limit. */ protected function log($form_id, $type): void { protected function log(string $form_id, string $type): void { $this->logFailure($form_id, $type); if ($this->config->get('log')) { $variables = [ Loading @@ -368,7 +368,7 @@ class HoneypotService implements HoneypotServiceInterface { /** * {@inheritdoc} */ public function logFailure($form_id, $type): void { public function logFailure(string $form_id, string $type): void { $uid = $this->account->id(); // Log failed submissions. Loading src/HoneypotServiceInterface.php +1 −1 Original line number Diff line number Diff line Loading @@ -52,6 +52,6 @@ interface HoneypotServiceInterface { * - honeypot: If honeypot field was filled in. * - honeypot_time: If form was completed before the configured time limit. */ public function logFailure($form_id, $type): void; public function logFailure(string $form_id, string $type): void; } Loading
src/HoneypotService.php +4 −4 Original line number Diff line number Diff line Loading @@ -293,7 +293,7 @@ class HoneypotService implements HoneypotServiceInterface { * @param array $complete_form * The complete form structure. */ public function validateHoneypot(array &$element, FormStateInterface $form_state, array &$complete_form) { public function validateHoneypot(array &$element, FormStateInterface $form_state, array &$complete_form): void { // Get the honeypot field value. $honeypot_value = $element['#value']; Loading @@ -315,7 +315,7 @@ class HoneypotService implements HoneypotServiceInterface { * @param array $complete_form * The complete form structure. */ public function validateTimeRestriction(array &$element, FormStateInterface $form_state, array &$complete_form) { public function validateTimeRestriction(array &$element, FormStateInterface $form_state, array &$complete_form): void { if ($form_state->isProgrammed()) { // Don't do anything if the form was submitted programmatically. return; Loading Loading @@ -354,7 +354,7 @@ class HoneypotService implements HoneypotServiceInterface { * - honeypot: If honeypot field was filled in. * - honeypot_time: If form was completed before the configured time limit. */ protected function log($form_id, $type): void { protected function log(string $form_id, string $type): void { $this->logFailure($form_id, $type); if ($this->config->get('log')) { $variables = [ Loading @@ -368,7 +368,7 @@ class HoneypotService implements HoneypotServiceInterface { /** * {@inheritdoc} */ public function logFailure($form_id, $type): void { public function logFailure(string $form_id, string $type): void { $uid = $this->account->id(); // Log failed submissions. Loading
src/HoneypotServiceInterface.php +1 −1 Original line number Diff line number Diff line Loading @@ -52,6 +52,6 @@ interface HoneypotServiceInterface { * - honeypot: If honeypot field was filled in. * - honeypot_time: If form was completed before the configured time limit. */ public function logFailure($form_id, $type): void; public function logFailure(string $form_id, string $type): void; }