Code Duplication    Length = 10-10 lines in 4 locations

src/Setting/Form/SettingFormFields.php 4 locations

@@ 74-83 (lines=10) @@
71
            // Make sure we have a config property.
72
            $field['config'] = array_get($field, 'config', []);
73
74
            if (trans()->has(
75
                $label = array_get(
76
                    $field,
77
                    'label',
78
                    $namespace . 'setting.' . $slug . '.label'
79
                )
80
            )
81
            ) {
82
                $field['label'] = $label;
83
            }
84
85
            // Default the label.
86
            $field['label'] = array_get(
@@ 93-102 (lines=10) @@
90
            );
91
92
            // Default the warning.
93
            if (trans()->has(
94
                $warning = array_get(
95
                    $field,
96
                    'warning',
97
                    $namespace . 'setting.' . $slug . '.warning'
98
                )
99
            )
100
            ) {
101
                $field['warning'] = $warning;
102
            }
103
104
            // Default the placeholder.
105
            if (trans()->has(
@@ 105-114 (lines=10) @@
102
            }
103
104
            // Default the placeholder.
105
            if (trans()->has(
106
                $placeholder = array_get(
107
                    $field,
108
                    'placeholder',
109
                    $namespace . 'setting.' . $slug . '.placeholder'
110
                )
111
            )
112
            ) {
113
                $field['placeholder'] = $placeholder;
114
            }
115
116
            // Default the instructions.
117
            if (trans()->has(
@@ 117-126 (lines=10) @@
114
            }
115
116
            // Default the instructions.
117
            if (trans()->has(
118
                $instructions = array_get(
119
                    $field,
120
                    'instructions',
121
                    $namespace . 'setting.' . $slug . '.instructions'
122
                )
123
            )
124
            ) {
125
                $field['instructions'] = $instructions;
126
            }
127
128
            // Get the value defaulting to the default value.
129
            if (!isset($field['value'])) {