Code Duplication    Length = 11-11 lines in 2 locations

src/Form/Field/Embeds.php 1 location

@@ 85-95 (lines=11) @@
82
            return array_merge($a, call_user_func_array('array_merge', $b));
83
        };
84
85
        $array_key_clean_undot = function (array $a) {
86
            $keys = preg_grep('/[\.\:]/', array_keys($a));
87
            if ($keys) {
88
                foreach ($keys as $key) {
89
                    array_set($a, str_replace(':', '', $key), $a[$key]);
90
                    unset($a[$key]);
91
                }
92
            }
93
94
            return $a;
95
        };
96
97
        /** @var Field $field */
98
        foreach ($this->buildEmbeddedForm()->fields() as $field) {

src/Form/Field/HasMany.php 1 location

@@ 124-134 (lines=11) @@
121
            return array_merge($a, call_user_func_array('array_merge', $b));
122
        };
123
124
        $array_key_clean_undot = function (array $a) {
125
            $keys = preg_grep('/[\.\:]/', array_keys($a));
126
            if ($keys) {
127
                foreach ($keys as $key) {
128
                    array_set($a, str_replace(':', '', $key), $a[$key]);
129
                    unset($a[$key]);
130
                }
131
            }
132
133
            return $a;
134
        };
135
136
        $input = array_only($input, $this->column);
137
        $form = $this->buildNestedForm($this->column, $this->builder);