Code Duplication    Length = 13-13 lines in 2 locations

src/Field/LinkField.php 1 location

@@ 77-89 (lines=13) @@
74
75
                return $value;
76
            })
77
            ->setNormalizer('parameters', function (Options $options, $values) {
78
                $cleanedValues = [];
79
80
                foreach ($values as $name => $method) {
81
                    if (null === $method) {
82
                        $method = $name;
83
                    }
84
                    $cleanedValues[$name] = $method;
85
                }
86
87
88
                return $cleanedValues;
89
            })
90
        ;
91
    }
92

src/Field/ActionCollectionField.php 1 location

@@ 169-181 (lines=13) @@
166
167
                return $value;
168
            })
169
            ->setNormalizer('parameters', function (Options $options, $values) {
170
                $cleanedValues = [];
171
172
                foreach ($values as $name => $method) {
173
                    if (null === $method) {
174
                        $method = $name;
175
                    }
176
                    $cleanedValues[$name] = $method;
177
                }
178
179
180
                return $cleanedValues;
181
            })
182
        ;
183
184
        return $resolver->resolve($actionLinkConfiguration);