| @@ -10,15 +10,14 @@ | ||
| 10 | 10 | */ |
| 11 | 11 | protected $form_id; |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | - * @var object|null | |
| 14 | + * @var object | |
| 15 | 15 | */ |
| 16 | 16 | protected $form; |
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * @since 6.21 |
| 20 | - * | |
| 21 | 20 | * @var string |
| 22 | 21 | */ |
| 23 | 22 | protected $option_type = 'form'; |
| 24 | 23 | |
| @@ -29,12 +28,12 @@ | ||
| 29 | 28 | $this->form_id = $form_id; |
| 30 | 29 | } |
| 31 | 30 | |
| 32 | 31 | /** |
| 33 | - * @return object|null Form. | |
| 32 | + * @return object $form | |
| 34 | 33 | */ |
| 35 | 34 | protected function get_form() { |
| 36 | - if ( ! $this->form ) { | |
| 35 | + if ( empty( $this->form ) ) { | |
| 37 | 36 | $this->form = FrmForm::getOne( $this->form_id ); |
| 38 | 37 | } |
| 39 | 38 | return $this->form; |
| 40 | 39 | } |
| @@ -43,9 +42,8 @@ | ||
| 43 | 42 | * @return bool |
| 44 | 43 | */ |
| 45 | 44 | protected function is_option_on() { |
| 46 | 45 | $key = $this->get_option_key(); |
| 47 | - | |
| 48 | 46 | if ( 'global' === $this->option_type ) { |
| 49 | 47 | $frm_settings = FrmAppHelper::get_settings(); |
| 50 | 48 | return ! empty( $frm_settings->$key ); |
| 51 | 49 | } |