| @@ -1,48 +1,44 @@ | ||
| 1 | 1 | <?php |
| 2 | - | |
| 3 | 2 | namespace Give\FormAPI\Form; |
| 4 | 3 | |
| 5 | -class Radio extends Field | |
| 6 | -{ | |
| 7 | - /** | |
| 8 | - * Field options. | |
| 9 | - * | |
| 10 | - * @sicne 2.7.0 | |
| 11 | - * @var array | |
| 12 | - */ | |
| 13 | - public $options = []; | |
| 4 | +class Radio extends Field { | |
| 5 | + /** | |
| 6 | + * Field options. | |
| 7 | + * | |
| 8 | + * @sicne 2.7.0 | |
| 9 | + * @var array | |
| 10 | + */ | |
| 11 | + public $options = []; | |
| 14 | 12 | |
| 15 | - /** | |
| 16 | - * Field display style. | |
| 17 | - * | |
| 18 | - * @since 2.7.0 | |
| 19 | - * @var string | |
| 20 | - */ | |
| 21 | - public $displayStyle = ''; | |
| 13 | + /** | |
| 14 | + * Field display style. | |
| 15 | + * | |
| 16 | + * @since 2.7.0 | |
| 17 | + * @var string | |
| 18 | + */ | |
| 19 | + public $displayStyle = ''; | |
| 22 | 20 | |
| 23 | - /** | |
| 24 | - * @inheritDoc | |
| 25 | - */ | |
| 26 | - public function parse($array) | |
| 27 | - { | |
| 28 | - parent::parse($array); | |
| 21 | + /** | |
| 22 | + * @inheritDoc | |
| 23 | + */ | |
| 24 | + public function parse( $array ) { | |
| 25 | + parent::parse( $array ); | |
| 29 | 26 | |
| 30 | - $this->options = isset($array['options']) ? $array['options'] : []; | |
| 27 | + $this->options = isset( $array['options'] ) ? $array['options'] : []; | |
| 31 | 28 | |
| 32 | - $type = explode('_', $this->type, 2); | |
| 33 | - $this->displayStyle = false !== strpos('_', $this->type) ? array_pop($type) : ''; | |
| 34 | - } | |
| 29 | + $type = explode( '_', $this->type, 2 ); | |
| 30 | + $this->displayStyle = false !== strpos( '_', $this->type ) ? array_pop( $type ) : ''; | |
| 31 | + } | |
| 35 | 32 | |
| 36 | - /** | |
| 37 | - * @inheritDoc | |
| 38 | - */ | |
| 39 | - public function toArray() | |
| 40 | - { | |
| 41 | - return array_merge( | |
| 42 | - parent::toArray(), | |
| 43 | - [ | |
| 44 | - 'options' => $this->options, | |
| 45 | - ] | |
| 46 | - ); | |
| 47 | - } | |
| 33 | + /** | |
| 34 | + * @inheritDoc | |
| 35 | + */ | |
| 36 | + public function toArray() { | |
| 37 | + return array_merge( | |
| 38 | + parent::toArray(), | |
| 39 | + [ | |
| 40 | + 'options' => $this->options, | |
| 41 | + ] | |
| 42 | + ); | |
| 43 | + } | |
| 48 | 44 | } |