Code Duplication    Length = 10-10 lines in 2 locations

src/Form/Field/Embeds.php 1 location

@@ 83-92 (lines=10) @@
80
            return $a;
81
        };
82
83
        $array_key_clean_undot = function (array $a) {
84
            if (count($a))
85
                foreach ($a as $key => $val) {
86
                array_set($a, str_replace(':', '', $key), $val);
87
                if (preg_match('/[\.\:]/', $key)) {
88
                    unset($a[$key]);
89
                }
90
            }
91
            return $a;
92
        };
93
94
        /** @var Field $field */
95
        foreach ($this->buildEmbeddedForm()->fields() as $field) {

src/Form/Field/HasMany.php 1 location

@@ 120-129 (lines=10) @@
117
            return $a;
118
        };
119
120
        $array_key_clean_undot = function (array $a) {
121
            if (count($a))
122
                foreach ($a as $key => $val) {
123
                array_set($a, str_replace(':', '', $key), $val);
124
                if (preg_match('/[\.\:]/', $key)) {
125
                    unset($a[$key]);
126
                }
127
            }
128
            return $a;
129
        };
130
131
        $input = array_only($input, $this->column);
132
        $form = $this->buildNestedForm($this->column, $this->builder);