Code Duplication    Length = 11-11 lines in 2 locations

src/Form/Field/Embeds.php 1 location

@@ 96-106 (lines=11) @@
93
            );
94
        };
95
96
        $array_key_clean_undot = function (array $a) {
97
            $keys = preg_grep('/[\.\:]/', array_keys($a));
98
            if ($keys) {
99
                foreach ($keys as $key) {
100
                    array_set($a, str_replace(':', '', $key), $a[$key]);
101
                    unset($a[$key]);
102
                }
103
            }
104
105
            return $a;
106
        };
107
108
        /** @var Field $field */
109
        foreach ($this->buildEmbeddedForm()->fields() as $field) {

src/Form/Field/HasMany.php 1 location

@@ 135-145 (lines=11) @@
132
            );
133
        };
134
135
        $array_key_clean_undot = function (array $a) {
136
            $keys = preg_grep('/[\.\:]/', array_keys($a));
137
            if ($keys) {
138
                foreach ($keys as $key) {
139
                    array_set($a, str_replace(':', '', $key), $a[$key]);
140
                    unset($a[$key]);
141
                }
142
            }
143
144
            return $a;
145
        };
146
147
        $input = array_only($input, $this->column);
148
        $form = $this->buildNestedForm($this->column, $this->builder);