This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
7
8
/**
9
* @var string
10
* @since 3.0
11
*/
12
protected $type = 'radio';
13
14
/**
15
* @var bool
16
* @since 3.0
17
*/
18
protected $holds_email_values = true;
19
20
/**
21
* Does the html for this field label need to include "for"?
It seems like empty($form_id) ? 'default' : $form_id can also be of type array; however, FrmStylesController::get_style_val() does only seem to accept string, maybe add an additional type check?
If a method or function can return multiple different values and unless you are
sure that you only can receive a single value in this context, we recommend
to add an additional type check:
/** * @return array|string */functionreturnsDifferentValues($x){if($x){return'foo';}returnarray();}$x=returnsDifferentValues($y);if(is_array($x)){// $x is an array.}
If this a common case that PHP Analyzer should handle natively, please let us
know by opening an issue.
Loading history...
53
);
54
}
55
56
protected function new_field_settings() {
57
return array(
58
'options' => serialize(
59
array(
60
__( 'Option 1', 'formidable' ),
61
__( 'Option 2', 'formidable' ),
62
)
63
),
64
);
65
}
66
67
/**
68
* @since 4.06
69
*/
70
protected function show_priority_field_choices( $args = array() ) {
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.