Code Duplication    Length = 7-7 lines in 2 locations

src/Form/Field/Embeds.php 1 location

@@ 207-213 (lines=7) @@
204
            //Fix ResetInput Function! A Headache Implementation!
205
            $col1 = explode(':', $col)[0];
206
            if (!array_key_exists($col1, $availInput[$rel])) return [null => null];
207
            if (is_array($availInput[$rel][$col1])) {
208
                if (array_keys($availInput[$rel][$col1]))
209
                    return call_user_func_array('array_merge', array_map(function ($x) use ($idx, $attributes) {
210
                    return ["{$idx}.{$x}" => $attributes[$idx]];
211
                }, array_keys($availInput[$rel][$col1])));
212
                return [null => null];
213
            }
214
215
            return ["{$idx}" => $attributes[$idx]];
216
        }, array_keys($attributes));

src/Form/Field/HasMany.php 1 location

@@ 245-251 (lines=7) @@
242
            //Fix ResetInput Function! A Headache Implementation!
243
            $col1 = explode(':', $col)[0];
244
            if (!array_key_exists($col1, $availInput[$key])) return [null => null];
245
            if (is_array($availInput[$key][$col1])) {
246
                if (array_keys($availInput[$key][$col1]))
247
                    return call_user_func_array('array_merge', array_map(function ($x) use ($idx, $attributes) {
248
                    return ["{$idx}.{$x}" => $attributes[$idx]];
249
                }, array_keys($availInput[$key][$col1])));
250
                return [null => null];
251
            }
252
253
            return ["{$idx}" => $attributes[$idx]];
254
        }, array_keys($attributes));