| @@ -33,10 +33,9 @@ | ||
| 33 | 33 | /** |
| 34 | 34 | * @return bool |
| 35 | 35 | */ |
| 36 | 36 | private static function is_enabled() { |
| 37 | - $frm_settings = FrmAppHelper::get_settings(); | |
| 38 | - return $frm_settings->honeypot; | |
| 37 | + return (bool) FrmAppHelper::get_settings()->honeypot; | |
| 39 | 38 | } |
| 40 | 39 | |
| 41 | 40 | /** |
| 42 | 41 | * @return bool |
| @@ -42,9 +41,9 @@ | ||
| 42 | 41 | * @return bool |
| 43 | 42 | */ |
| 44 | 43 | public function validate() { |
| 45 | 44 | if ( ! $this->is_option_on() || ! $this->check_honeypot_filter() ) { |
| 46 | - // never flag as honeypot spam if disabled. | |
| 45 | + // Never flag as honeypot spam if disabled. | |
| 47 | 46 | return true; |
| 48 | 47 | } |
| 49 | 48 | return ! $this->is_honeypot_spam(); |
| 50 | 49 | } |
| @@ -239,8 +238,9 @@ | ||
| 239 | 238 | ); |
| 240 | 239 | |
| 241 | 240 | $container_id = 'frm_field_' . $field_id . '_container'; |
| 242 | 241 | $this->track_html_id( $container_id ); |
| 242 | + // phpcs:disable Generic.WhiteSpace.ScopeIndent | |
| 243 | 243 | ?> |
| 244 | 244 | <div id="<?php echo esc_attr( $container_id ); ?>"> |
| 245 | 245 | <label for="<?php echo esc_attr( $input_attrs['id'] ); ?>" <?php FrmFormsHelper::maybe_hide_inline(); ?>> |
| 246 | 246 | <?php esc_html_e( 'If you are human, leave this field blank.', 'formidable' ); ?> |
| @@ -247,8 +247,9 @@ | ||
| 247 | 247 | </label> |
| 248 | 248 | <input <?php FrmAppHelper::array_to_html_params( $input_attrs, true ); ?> <?php FrmFormsHelper::maybe_hide_inline(); ?> /> |
| 249 | 249 | </div> |
| 250 | 250 | <?php |
| 251 | + // phpcs:enable Generic.WhiteSpace.ScopeIndent | |
| 251 | 252 | } |
| 252 | 253 | |
| 253 | 254 | /** |
| 254 | 255 | * @param string $html_id |