| @@ -44,12 +44,12 @@ | ||
| 44 | 44 | */ |
| 45 | 45 | protected $format = 'text'; |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | - * @var FrmTableHTMLGenerator | |
| 48 | + * @var FrmTableHTMLGenerator|null | |
| 49 | 49 | * @since 2.04 |
| 50 | 50 | */ |
| 51 | - protected $table_generator = null; | |
| 51 | + protected $table_generator; | |
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | 54 | * @var array |
| 55 | 55 | * @since 2.04 |
| @@ -59,9 +59,9 @@ | ||
| 59 | 59 | /** |
| 60 | 60 | * FrmEntryShortcodeFormatter constructor |
| 61 | 61 | * |
| 62 | 62 | * @param int|string $form_id |
| 63 | - * @param array $atts | |
| 63 | + * @param array $atts | |
| 64 | 64 | */ |
| 65 | 65 | public function __construct( $form_id, $atts ) { |
| 66 | 66 | if ( ! $form_id ) { |
| 67 | 67 | return; |
| @@ -86,9 +86,8 @@ | ||
| 86 | 86 | * Initialize the form_id property |
| 87 | 87 | * |
| 88 | 88 | * @since 2.04 |
| 89 | 89 | * |
| 90 | - * @param $form_id | |
| 91 | 90 | * @param int|string $form_id |
| 92 | 91 | * |
| 93 | 92 | * @return void |
| 94 | 93 | */ |
| @@ -159,9 +158,9 @@ | ||
| 159 | 158 | if ( ! $this->form_id || empty( $this->fields ) ) { |
| 160 | 159 | return ''; |
| 161 | 160 | } |
| 162 | 161 | |
| 163 | - if ( $this->format == 'array' ) { | |
| 162 | + if ( $this->format === 'array' ) { | |
| 164 | 163 | $content = $this->get_array(); |
| 165 | 164 | } elseif ( $this->is_plain_text_format() ) { |
| 166 | 165 | $content = $this->get_plain_text(); |
| 167 | 166 | } else { |
| @@ -204,9 +203,9 @@ | ||
| 204 | 203 | * |
| 205 | 204 | * @return string |
| 206 | 205 | */ |
| 207 | 206 | protected function get_table() { |
| 208 | - $content = $this->table_generator->generate_table_header(); | |
| 207 | + $content = $this->table_generator->generate_table_header(); | |
| 209 | 208 | $content .= $this->generate_content_for_all_fields(); |
| 210 | 209 | $content .= $this->table_generator->generate_table_footer(); |
| 211 | 210 | |
| 212 | 211 | return $content; |
| @@ -253,9 +252,9 @@ | ||
| 253 | 252 | * |
| 254 | 253 | * @since 2.04 |
| 255 | 254 | * |
| 256 | 255 | * @param stdClass $field |
| 257 | - * @param mixed $value | |
| 256 | + * @param mixed $value | |
| 258 | 257 | * |
| 259 | 258 | * @return string |
| 260 | 259 | */ |
| 261 | 260 | protected function generate_two_cell_shortcode_row( $field, $value = null ) { |
| @@ -304,9 +303,9 @@ | ||
| 304 | 303 | * |
| 305 | 304 | * @since 2.04 |
| 306 | 305 | * |
| 307 | 306 | * @param stdClass $field |
| 308 | - * @param string $value | |
| 307 | + * @param string $value | |
| 309 | 308 | * |
| 310 | 309 | * @return void |
| 311 | 310 | */ |
| 312 | 311 | protected function add_single_field_array( $field, $value ) { |