Code Duplication    Length = 6-7 lines in 2 locations

src/Form/Field/Embeds.php 1 location

@@ 142-148 (lines=7) @@
139
            ));
140
            $attributes = array_merge($attributes, call_user_func_array(
141
                'array_merge',
142
                array_map(function ($v) use ($field) {
143
                    //Fix ResetInput Function! A Headache Implementation!
144
                    $u = $field->label();
145
                    $u .= is_array($field->column()) ? '['.explode(':', explode('.', $v)[1])[0].']' : '';
146
147
                    return [$v => "{$u}"];
148
                }, $newColumn)
149
            ));
150
            if ($field->validationMessages) {
151
                $newMessages = array_map(function ($v) use ($field, $availInput, $array_key_attach_str) {

src/Form/Field/HasMany.php 1 location

@@ 205-210 (lines=6) @@
202
                }
203
204
                if (is_array($availInput[$k][$col])) {
205
                    return call_user_func_array('array_merge', array_map(function ($u) use ($v, $field) {
206
                        $w = $field->label();
207
                        //Fix ResetInput Function! A Headache Implementation!
208
                        $w .= is_array($field->column()) ? '[' . explode(':', explode('.', $v)[1])[0] . ']' : '';
209
                        return ["{$v}{$u}" => $w];
210
                    }, array_keys($$availInput[$k][$col])));
211
                }
212
213
                $w = $field->label();