Code Duplication    Length = 8-10 lines in 2 locations

src/Form/Field/MultipleImage.php 1 location

@@ 30-39 (lines=10) @@
27
     *
28
     * @return mixed|string
29
     */
30
    protected function prepareForeach(UploadedFile $image = null)
31
    {
32
        $this->name = $this->getStoreName($image);
33
34
        $this->callInterventionMethods($image->getRealPath());
35
36
        return tap($this->upload($image), function () {
37
            $this->name = null;
38
        });
39
    }
40
}
41

src/Form/Field/MultipleFile.php 1 location

@@ 171-178 (lines=8) @@
168
     *
169
     * @return mixed|string
170
     */
171
    protected function prepareForeach(UploadedFile $file = null)
172
    {
173
        $this->name = $this->getStoreName($file);
174
175
        return tap($this->upload($file), function () {
176
            $this->name = null;
177
        });
178
    }
179
180
    /**
181
     * Preview html for file-upload plugin.