| @@ -27,9 +27,9 @@ | ||
| 27 | 27 | */ |
| 28 | 28 | private $active_field_size; |
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | - * @var bool $is_frm_first flagged while calling get_field_layout_class, true if classes contain frm_first class. | |
| 31 | + * @var bool flagged while calling get_field_layout_class, true if classes contain frm_first class. | |
| 32 | 32 | */ |
| 33 | 33 | private $is_frm_first; |
| 34 | 34 | |
| 35 | 35 | /** |
| @@ -37,19 +37,19 @@ | ||
| 37 | 37 | */ |
| 38 | 38 | private $field; |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | - * @var FrmFieldGridHelper $section_helper | |
| 41 | + * @var FrmFieldGridHelper | |
| 42 | 42 | */ |
| 43 | 43 | private $section_helper; |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | - * @var bool $nested | |
| 46 | + * @var bool | |
| 47 | 47 | */ |
| 48 | 48 | private $nested; |
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | - * @var int $section_size | |
| 51 | + * @var int | |
| 52 | 52 | */ |
| 53 | 53 | private $section_size; |
| 54 | 54 | |
| 55 | 55 | private $section_is_open = false; |
| @@ -80,9 +80,9 @@ | ||
| 80 | 80 | $this->section_is_open = false; |
| 81 | 81 | $this->maybe_close_section_helper(); |
| 82 | 82 | } else { |
| 83 | 83 | $this->field_layout_class = $this->get_field_layout_class(); |
| 84 | - $this->active_field_size = $this->get_size_of_class( $this->field_layout_class ); | |
| 84 | + $this->active_field_size = self::get_size_of_class( $this->field_layout_class ); | |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | if ( 'divider' === $field->type && empty( $this->nested ) ) { |
| 88 | 88 | $this->section_size = $this->active_field_size; |
| @@ -199,9 +199,9 @@ | ||
| 199 | 199 | /** |
| 200 | 200 | * @return void |
| 201 | 201 | */ |
| 202 | 202 | public function sync_list_size() { |
| 203 | - if ( ! isset( $this->field ) ) { | |
| 203 | + if ( empty( $this->field ) ) { | |
| 204 | 204 | return; |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | if ( 'divider' === $this->field->type ) { |
| @@ -216,9 +216,9 @@ | ||
| 216 | 216 | return; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | if ( false !== $this->parent_li ) { |
| 220 | - $this->current_field_count ++; | |
| 220 | + ++$this->current_field_count; | |
| 221 | 221 | $this->current_list_size += $this->active_field_size; |
| 222 | 222 | if ( 12 === $this->current_list_size ) { |
| 223 | 223 | $this->close_field_wrapper(); |
| 224 | 224 | } |
| @@ -262,9 +262,9 @@ | ||
| 262 | 262 | * @param string $class |
| 263 | 263 | * @return bool |
| 264 | 264 | */ |
| 265 | 265 | private function can_support_an_additional_layout( $class ) { |
| 266 | - $size = $this->get_size_of_class( $class ); | |
| 266 | + $size = self::get_size_of_class( $class ); | |
| 267 | 267 | return $this->current_list_size + $size <= 12; |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | /** |